Bug #14974 Updated: Transparency with ImageCopy

From: Date: Sat, 19 Jan 2002 01:39:10 +0000
Subject: Bug #14974 Updated: Transparency with ImageCopy
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-77487@lists.php.net to get a copy of this message
ID: 14974 Comment by: cyril@pernin.net Reported By: cyril@pernin.net Status: Open Bug Type: GD related Operating System: WIN / LINUX PHP Version: 4.0.6 New Comment: GD 1.6.2 and not 1.0.6 Previous Comments: ------------------------------------------------------------------------ [2002-01-10 14:13:36] cyril@pernin.net with GD if i copy a part of a pict2.png (with tranparency set) in an other pict1.png. GD 1.0.6 give me : the picct1.png image is visible under the tranparency zone of the copied image (pict1.png)... :) GD 2.0 (same script) the same zone is transparent :( what can i do? here is the script: <?php function LoadGif ($xxxmgname) { $xxxm = @ImageCreateFromPNG ($xxxmgname); $bg = ImageColorAllocate ($xxxm, 255, 255, 255); return $xxxm; } header ("Content-type: image/PNG "); $xxxm = @ImageCreate (450, 300) or die ("Cannot Initialize new GD image stream"); $bg = ImageColorAllocate ($xxxm, 255, 255, 255); imagecolortransparent($xxxm, $bg); $couleurnoms = ImageColorAllocate ($xxxm, 250, 250, 250); $xxxm=loadgif ("vierge.png"); $paysages=loadgif ("images.png"); ImageCopy ($xxxm,$paysages, 150, 100, 261, 196, 63, 63); $color=imagecolorstotal ($xxxm); ImageString ($xxxm, 2, 10, 250, "$color couleurs", $couleurnoms); ImagePNG ($xxxm);// Imagejpeg($im,'',20); ImageDestroy ($xxxm); ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14974&edit=1

« previous php.dev (#77487) next »