I've slowly been getting the hang of Imagick. I can now stitch together and composite multiple images, but I'm having trouble doing it when the images
to be composited have differing dimensions.
The goal is to take two images with different sizes, layer them with the smaller one behind the larger one, center them, and then flatten it and print
it to the screen.
My approach on the command-line (perhaps not the best, but a start), is:
1. mogrify the smaller image to extend the canvas so that it matches the larger image:
Code: Select all
mogrify -bordercolor transparent -border 256x256 smaller_image.jpg
Code: Select all
composite front.png smaller_image.jpg -gravity center composite.png
but if I do it the way I would for equally-sized images, only the corner of the larger image is shown.
If I switch the order, I can get the canvas to take on the size of the larger image, however, then the
placement and centering is off.
Does anyone have any ideas? Any help would be greatly appreciated.
Thanks!
Keith