Page 1 of 1

Transparency and PNG

Posted: 2010-12-06T11:39:17-07:00
by Excale
Hi,

I'm trying to convert PNG and GIF files using Imagick.

Here is my code:

Code: Select all

try {
$thumb4 = new Imagick($name . '.' . $extension_upload);
$thumb4->setImageOpacity(1.0);
$thumb4->resizeImage(318,212,Imagick::FILTER_LANCZOS,1);
$thumb4->writeImage($name . '.' . "bmp");
$thumb4->destroy(); 
} catch (Exception $e) {
    echo '<br />Corrupt file!';
}
I have a problem with PNG and GIF files. Most of the times, transparency is convert in blue (or an over color).
Why blue?

How can I convert transparency in white?

Thank you for your help :D .

Re: Transparency and PNG

Posted: 2010-12-08T13:28:46-07:00
by Excale
Can someone help me please :) ?