php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14974 Transparency with ImageCopy
Submitted: 2002-01-10 14:13 UTC Modified: 2002-06-07 07:44 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: cyril at pernin dot net Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.0.6 OS: WIN / LINUX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cyril at pernin dot net
New email:
PHP Version: OS:

 

 [2002-01-10 14:13 UTC] cyril at pernin dot 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);
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-18 20:39 UTC] cyril at pernin dot net
GD 1.6.2 and not 1.0.6
 [2002-06-07 07:44 UTC] edink@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC