|  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
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
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.
Block user comment
Status: Assign to:
Bug Type:
From: thomas at krantz dot com
New email:
PHP Version: OS:


 [2005-05-24 13:50 UTC] thomas at krantz dot com
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:
$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");
See also

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

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-30 22:59 UTC]
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
Thank you for the report, and for helping us make PHP better.

Fixed in all cvs branches, thanks for your feedback.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 16:03:37 2021 UTC