#19133 [Opn->Csd]: imagecopymerge doesn't work correctly in gd2
| From: | rasmus@php.net | Date: | Sun, 06 Oct 2002 07:08:01 +0000 |
| Subject: | #19133 [Opn->Csd]: imagecopymerge doesn't work correctly in gd2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-21624@lists.php.net to get a copy of this message | ||
ID: 19133
Updated by: rasmus@php.net
Reported By: dhunter@ssesco.com
-Status: Open
+Status: Closed
Bug Type: GD related
Operating System: Win2K
PHP Version: 4.2.2
New Comment:
I verified that this works correctly in the bundled GD2 in PHP 4.3.
Previous Comments:
------------------------------------------------------------------------
[2002-08-29 16:32:16] dhunter@ssesco.com
Sorry, we have to stick with version 4.2.2 for now.
Can anyone think of any possible workarounds?
------------------------------------------------------------------------
[2002-08-28 13:57:34] sander@php.net
This might be fixed with the bundled verion of GD2 available with
4.3.0. Please try a snapshot from http://snaps.php.net.
------------------------------------------------------------------------
[2002-08-28 13:02:59] dhunter@ssesco.com
Sample script:
<?php
$Png0 = "c:\\thumbs\\TERRAIN_color_big.PNG";
$Png1 = "c:\\thumbs\\Z00_LYR3_MAP_T_STATES_CYAN.png";
$Png2 = "c:\\thumbs\\eta_big.png";
$Timg= "c:\\thumbs\\test.png";
$Tim0= ImageCreateFromPng($Png0);
$Tim1= ImageCreateFromPng($Png1);
$Tim2= ImageCreateFromPng($Png2);
ImageCopyMerge($Tim0,$Tim1,0,0,0,0,649,548,100);
ImageDestroy($Tim1);
ImageCopyMerge($Tim0,$Tim2,0,0,0,0,649,548,100);
ImageDestroy($Tim2);
ImagePng($Tim0,$Timg);
ImageDestroy($Tim0);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<STYLE><!--
.LYR0 {position: absolute; TOP:800; LEFT:10;z-Index:0; }
.LYR1 {position: absolute; TOP:800; LEFT:10;z-Index:1; }
.LYR2 {position: absolute; TOP:800; LEFT:10;z-Index:2; }
--></style>
</head>
<body>
<!-- display the composite image -->
<img src=<?php echo "$Timg"; ?>><br><br>
<!-- for comparison, display the PNGs layered atop one another -->
<span class=LYR0><img src=<?php echo "$Png0"; ?>></span>
<span class=LYR1><img src=<?php echo "$Png1"; ?>></span>
<span class=LYR2><img src=<?php echo "$Png2"; ?>></span>
</body>
</html>
Note that with php_gd2, the composite image "$Timg" ends up identical
to $Png3. With php_gd, it looks identical to the three PNGs layered
atop one another using CSS (which is what I believe to be the proper
behavior).
------------------------------------------------------------------------
[2002-08-28 12:27:46] kalowsky@php.net
sample script?
------------------------------------------------------------------------
[2002-08-28 11:11:31] dhunter@ssesco.com
Same behavior for PHP versions 4.1.2 and 4.2.2
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19133
--
Edit this bug report at http://bugs.php.net/?id=19133&edit=1