|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
27 + 39 = ?
Subscribe to this entry?

 [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: Thu Sep 23 15:03:37 2021 UTC