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?".
The resulting image is a flop in what I would refer to as a left to right direction (it's flopped along the right edge.) How would I go about making it a right to left direction (flopped along the left edge)? The same for flip(), the resulting image is an upwards flip (along the upper edge). How do I make it a downwards flip (along the bottom edge)? I'd like to make it so the user, when invoking the command, will indicate which direction they want the flip or flop (up/down/left/right).
My sketch was to try and show the options the OP wanted but looking at it I can now see that you are correct.
The mirror along the top is the same result as the mirror along the bottom and the mirror along the edges are the same. Before I looked at my own sketch again I thought they would be different!!
The resulting mirror image is the same whether it's a flip or a flop. It's along which edge is what makes the difference in the resulting image:
The code as written performs what I expect it to do. I'm trying to figure out how to go the other direction. Same thing with flip. Both of them seem to have their preferred edge to flop or flip on, so I'm wondering if there's a way to change that edge.
As in the code I provide, the way to handle that is to swap the order of the image before appending. I used +swap. I am not sure what the equivalent is in your API, since I only use the command line. But you can change the order of the two images to be appended in any way you can and it should work as you want.
Montage is probably overkill. Look for appendImage or something like that and swapImage or something like that or just change the code to reverse the order of the image in the append or montage statement.
I tried changing the order in the montage command, it never worked. Got into a weird loop that just ate up memory and never wrote anything out. I'll see what the swap equivalent is, if there is one for the Magick++ API.
Montage should respect the images, but you may have to do something different about which is the main image.
However, if you change to append rather than montage, it might work. I really don't know how the APIs work with regard to using different order of files. Perhaps it is not so simple. But there should be a way. Nevertheless, if there is a swap, that should work.
Someone who knows your API should be able to help with it. Sorry I cannot help further in that regard.
dlemstra wrote:Shouldn't you just change imagesList.push_back(cloneImg); to imagesList.push_front(cloneImg); ? This will put the images in a different order.
You'd think, but no. The resulting image is the same.
And changing which gets pushed back first also results in the same thing.
Have you tried using 'appendImages' instead of montage? This should be enough for you. You still need to put the 'cloned flop' at the beginning of your list.
Ok, SHOOT ME NOW ... just aim right for the center of my forehead and shoot ... urgh. imagesList.push_front() works as you suggested it should. Except, the file I was editing is not the file that was getting compiled. I was editing -v01 while the IDE was compiling -v02. I just noticed my second computer telling me that -v01 has changed and I went, huh, shouldn't .. then it hit me. I think it's time for me to quit now and go watch a movie or something ... sheesh.