#19133 [Fbk->Opn]: imagecopymerge doesn't work correctly in gd2

From: Date: Thu, 29 Aug 2002 20:32:16 +0000
Subject: #19133 [Fbk->Opn]: imagecopymerge doesn't work correctly in gd2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18180@lists.php.net to get a copy of this message
ID: 19133 User updated by: dhunter@ssesco.com Reported By: dhunter@ssesco.com -Status: Feedback +Status: Open Bug Type: GD related Operating System: Win2K PHP Version: 4.2.2 New Comment: Sorry, we have to stick with version 4.2.2 for now. Can anyone think of any possible workarounds? Previous Comments: ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ [2002-08-27 22:16:01] sniper@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- 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. ------------------------------------------------------------------------ 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

« previous php.bugs (#18180) next »