note 6946 deleted from ImageColorTransparent by ronabop
| From: | ronabop@php.net | Date: | Sat, 12 Aug 2000 05:43:17 +0000 |
| Subject: | note 6946 deleted from ImageColorTransparent by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-1456@lists.php.net to get a copy of this message | ||
In php3, I could create gifs with transparent backgrounds:<br>
<pre>
<?php
dl("gd.so");
Header("Content-type: image/gif");
$im = imagecreate(100,20);
$trans = ImageColorAllocate($im, 255,255,255);
imagecolortransparent($im,$trans);
/* allocate colours and draw the rest of the image */
imagegif($im);
imagedestroy($im);
?>
</pre>
with php4 using imagepng, the same thing
doesn't work, the background shows up
white.
<p>Is my code right, or did it work by fluke? ImagePng should support transparancy. How do I
create a PNG with transparent background?
<p>I'm using potato debian packages,+ mozilla M15 & communicator 4.73 to view the
pngs