Nick Deny Nick Deny - 6 months ago 39
Linux Question

ImageMagick, reverse my command

I have a terminal-command like this

convert images/keke_input.png -crop 50x100%+0+0 \( +clone -flop \) +append images/keke_output.png
//It's works like flop with [THIS][HALF], but i need to use flop with [HALF][THIS].

It's mirror-reverse half of input picture.
Ok, now I want to use second part of input picture to flop instead first. How I can do this?


Use this:

convert input.jpg -crop 50x100% -delete 0 ...

That will crop the image into 2 equal pieces, each one half of the full width. Then delete the first half and you will be left with the second.

So, if you start with this:

enter image description here

you will get this:

enter image description here

So, the full command would be:

convert input.jpg -crop 50x100% -delete 0 \( +clone -flop \) +append result.jpg

enter image description here