Testing Robbert van Andel
-----Original Message----- From: Arnaud [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 1:22 PM To: [EMAIL PROTECTED] Subject: [PHP] GD : Black background with imagecreatetruecolor Hi everyone, I'd like to use "imagecreatetruecolor" function in order to "cut and paste" JPG files on a white background. It seems not to work correctly. Here is my test scripts : This one works perfectly : <? $im=imagecreate(50,50); $COULEUR_BLANC=imagecolorallocate($im,255,255,255); header ("Content-type: image/png"); ImagePNG($im); imagedestroy($im); ?> I obtain a white image but using GD 2.x, the "imagecopy" function fails. This other script doesn't work : <? $im=imagecreatetruecolor(50,50); $COULEUR_BLANC=imagecolorallocate($im,255,255,255); header ("Content-type: image/png"); ImagePNG($im); imagedestroy($im); ?> I'm getting a black image. My configuration is PHP 4.2.3 with gd2 running on Windows XP (I've also tested it on my web provider machine - Linux with PHP 4.2.2) Any help would be great. Thanks in advance Arnaud -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers."