tags:

views:

34

answers:

1

So I basically have this:

$img = imagecreatefrompng('assets/other/redcircle.png');
imagepng($img);
imagedestroy($img);

So the redcircle.png file has a transparency (with anti aliasing). But GD just turns all the transparency in black? Is there a way to get back the original transparency?

+1  A: 

You have to tell GD to save the alpha using imagesavealpha: http://www.php.net/manual/en/function.imagesavealpha.php

Telanor
Ah that's great, thank you my friend.
Camoy