I have a website that generates polaroid images stacked on top of each other at different angles. So far, everything worked fine, but now I started to get a black background around transparent .png.
You can see the problem here . The images in the last album are all corrupted.
I am using imagemagick (6.5.4.7-3.fc12).
my commands look something like this:
the first one contains whitin foreach and generates a bunch of png, rotated at different angles
convert '{$sf}' -auto-orient -thumbnail 120x120 -gravity center -bordercolor snow -background black -polaroid {$angle} {$i}.png
the second team takes previously created images and stacks them toghater
convert '*.png' -background transparent -alpha on -gravity center -layers merge -extent 190x190 +repage -thumbnail 115x115 -gravity center -extent 120x120 'result.png'
As I understand it during debugging, a black background is already present in the images generated by the first command, and they appear only when the images are rotated. If I use -polaroid 0 instead of +polaroid , then the resulting images are fine.
I guess the problem is not with the code itself, but with ImageMagick or something else updated on my server, and this started this whole mess.
I also tried all sorts of combinations with the -alpha setting and everything else that I could find in imagemagick documents, which are even slightly related to transparency, but nothing works.
source share