From:             [EMAIL PROTECTED]
Operating system: WIN / LINUX
PHP version:      4.0.6
PHP Bug Type:     GD related
Bug description:  Transparency with ImageCopy

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 bug report at: http://bugs.php.net/?id=14974&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to