note 24384 rejected from ref.image by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 14 Aug 2002 20:53:01 +0000 |
| Subject: | note 24384 rejected from ref.image by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35031@lists.php.net to get a copy of this message | ||
Hi..
I found some problems using imagecopy and PNGs...
I'm gonna create an image that is built up by a big PNG and then I want to put small things on
it, let say a tree.
And this is what happent
In GD V1.6
The background image was load correctly and the small pictures that I copyed on the picture place
perfectly.
I saw the big picture behind the small pictures, wich had transparent background. It worked
perfectly.
In GD V2.02 I think, it's is >2.0 at least
Then with the same code, the little image just ignores the image that already are there, and just
lay over and the background became transparent, and you didn't se the color of the background
image.
Does anyone got what I mean?
The transparency on PNG are treated differnt I the versions. In one it's keept and in another
the background is comming trought...
The Code I Use:
$imgbase = imagecreate(500, 500);
$imgtiles = imagecreatefrompng("images/map2.png");
imagecopy($imgbase, $imgtiles, 0, 0, 0, 0, 500, 500);
$imgtiles = imagecreatefrompng("images/tiles/1.png");
imagecopy($imgbase, $imgtiles, 0, 0, 0, 0, 20, 20);
imgpng($imgbase);
Hope anyone understands my problem, and I sure hope that anyone has a solotion for this little (or
big) problem
Mail me if any got something to tell
/Jonas