i have a problem understanding ImageMagick in the following case:
Basically, what i do is to take a blank image of a certain size, then composite various copies of the same source image onto it. Each of those images can end up on the blank background in different sizes, with different cropping and rotation.
I had it all working before, but it was very slow, because i first created a blank image with a convert command. Then i used another convert command to resize/crop/rotate each of the images that should be placed onto the blank image. And then i used a third convert command to place the resized/cropped/rotated image onto the blank image.
Obviously this had to be changed. I ended up finding the -composite option for convert and decided to use it. The following example is the command that my tool has generated for layering two images onto a blank background.
Code: Select all
convert -size 1063x1500 -density 300x300 xc:white \
"files/test/test.jpg" -geometry 508x661^^+12+791 "files/test__processed/test.jpg" -composite \
"files/test/test.jpg" -geometry 508x661^^+543+791 "files/test__processed/test.jpg" -composite
Code: Select all
$crop = " -crop " . $width. "x" . $height . "+0+0 ";
$rotate = " -rotate 90 ";
I ran out of options here.
Maybe someone can help?
Thank you very much!
Edit: I am using IM 6.4.2 Q16 on Windows XP SP2