shift image with keeping original size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gh5555
Posts: 4
Joined: 2018-03-30T19:40:40-07:00
Authentication code: 1152

shift image with keeping original size

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: shift image with keeping original size

Post by snibgo »

I don't understand what you want. Can you show an example?

What version of IM do you use?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: shift image with keeping original size

Post 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
Post Reply