php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33125 imagecopymergegray produces mosaic rainbow effect
Submitted: 2005-05-24 13:50 UTC Modified: 2005-09-30 22:59 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: thomas at krantz dot com Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5.0.4, 4.3.11 OS: Linux
Private report: No CVE-ID: None
 [2005-05-24 13:50 UTC] thomas at krantz dot com
Description:
------------
When merging two images, one normal and the other one completely black, the output from imagecopymergegray produces a weird looking mosaic of the first.

Reproduce code:
---------------
<?php
$imPng = imagecreatefrompng("Tiles/Bamboo/9.png");
$imSrc = imagecreatefrompng("Tiles/Bamboo/black.png");
$height = imagesy($imPng); 
imagecopymergegray($imPng, $imSrc, 0, 0, 0, 0, $height, $height, 50);
header("Content-type: image/png");
imagePng($imPng);
?>
See also 
http://www.tilehog.net/prepermission/showbug.html

Expected result:
----------------
The original image should be darkened by 50%. This was the result in the earlier version (4.3.10).

Actual result:
--------------
http://www.tilehog.net/prepermission/showbug.html

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-30 22:59 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in all cvs branches, thanks for your feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC