Problem with rotating multiple images to one image

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Only one rotate was used, so only the first image was rotated,
and you are -roatting just the frame, not the image.

Basically... Read in images BEFORE operating on them.

Code: Select all

convert -size 150x150 xc:transparent -fill white -stroke #aaa
-draw "rectangle 40,30 120,110" img1.png -geometry +43+33 -composite -rotate 10
-draw "rectangle 50,20 130,100" img2.png -geometry +53+23 -composite -rotate 10
-draw "rectangle 60,10 140,90" img2.png -geometry +63+13 -composite -rotate 10
output.png
At the end of each compose you only has one image in memory.
note however that rotates expands the in memory image, so you may need some other adjustments and final trimming. Also rotating an image multiple times may not be the best thing to do quality wise.

PS: I home you mind if I include an example somthing like this in IM examples, on poloroid image thumbnailing.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply