Efficiently blend multiple images into one image
Posted: 2012-11-13T06:10:17-07:00
Dear reader,
I would like to compose multiple PNG images (with transparency) on a background image with the blending mode set to Overlay. What is the most efficient way to do this? Is this possible with Imagick, or do I have to execute ImageMagick in a shell via exec()? I'd rather use Imagick because I've read it wins on performance over a shell execution.
I have used the compositeImage() command so far, which works fine but when you have 12 images to blend, you have to execute this command 12 times. I've read some documentation about this issue at http://imagemagick.org/Usage/layers/#compose but I can't seem to translate this shell code to Imagick.
Thanks in advance,
Ferenc
I would like to compose multiple PNG images (with transparency) on a background image with the blending mode set to Overlay. What is the most efficient way to do this? Is this possible with Imagick, or do I have to execute ImageMagick in a shell via exec()? I'd rather use Imagick because I've read it wins on performance over a shell execution.
I have used the compositeImage() command so far, which works fine but when you have 12 images to blend, you have to execute this command 12 times. I've read some documentation about this issue at http://imagemagick.org/Usage/layers/#compose but I can't seem to translate this shell code to Imagick.
Thanks in advance,
Ferenc