Page 1 of 1

shift image with keeping original size

Posted: 2018-04-02T15:47:59-07:00
by gh5555
Hi all ,

pleas I need your help

is there any way in ImageMagic to shift the original image to different positions with keeping the original size ?

I mean , can I generate 4 or more images from the original one by shifting the pixels to different sides (top , bottom , left, right) ?



I read about ( -rol ) and (-displace) but I cant find the right command :(


if there is , can I do it all in one command for all images in the folder?


I am using Win10

Re: shift image with keeping original size

Posted: 2018-04-02T15:57:11-07:00
by snibgo
I don't understand what you want. Can you show an example?

What version of IM do you use?

Re: shift image with keeping original size

Posted: 2018-04-02T16:20:41-07:00
by fmw42
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown

Not sure if this is what you want, but here are 3 different roll results.

Image

Code: Select all

convert lena.jpg \
\( -clone 0 -roll -128-128 +write lena_tl.jpg \) \
\( -clone 0 -roll -128+0 +write lena_l.jpg \) \
\( -clone 0 -roll +0-128 +write lena_t.jpg \) \
null:
Image

Image

Image