If you merge a PNG-32 (PNG format with an aplha channel) with another image, the transparent part of the original image will render with a solid black colour. The fix for this is quite simple.
$bg = new sfImage('main_image.jpg'); $bg = new sfImage('blank_frame.png'); // has alpha channel $bg->transparency('#000000'); // preserve alpha channel $bg->overlay($img, array(10,10)); |
The resulting image will retain the alpha channel transparency.
Do you know, how to transform transparency, to a specific colour when we transform png to jpg?