Nick Deny Nick Deny - 1 year ago 103
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download