Page 1 of 1

What's wrong with my commands?

Posted: 2018-02-14T13:42:40-07:00
by sindark87
So, I just discovered ImageMagick and I'm using it from windows command line. I'm trying to join a bunch of pictures side to side in a single file. Some of the images need to be flipped horizontally, some vertically. My command joins the images, some images gets flipped or flopped, but some don't; I can't figure out the pattern in what's happening, it's weird. This is the way I'm doing it (in this example I want to join four images in a row after flipping the first two horizontally and the second two vertically):

imagemagick.exe convert One.jpg -flop Two.jpg -flop Three.jpg -flip Four.jpg -flip +append Output.jpg

It seems this should be a simple task, any tips as to what I'm doing wrong?

Thanks:)

Re: What's wrong with my commands?

Posted: 2018-02-14T13:47:32-07:00
by snibgo
"-flop" operates on all the images in the current list. Same with "-flip". So some of your images get flopped twice, etc.

The cure is to use parentheses:

Code: Select all

imagemagick.exe convert ( One.jpg -flop ) ( Two.jpg -flop ) ( Three.jpg -flip ) ( Four.jpg -flip )  +append Output.jpg

Re: What's wrong with my commands?

Posted: 2018-02-14T13:51:55-07:00
by Bonzo
Just beat me to it snibgo

Also if you allowed Imagemagick to add itself to the environmental variable path you do not need imagemagick.exe and if you are using V7 it now uses magick rather than convert

Re: What's wrong with my commands?

Posted: 2018-02-14T23:38:22-07:00
by sindark87
Ah, of course, that's what's happening! Thank you guys, that's a lot of helpful information... until now I didn't even know about environmental variabels😁