ID: 24816 Comment by: mark at teckis dot com Reported By: jakob at gosign dot de Status: No Feedback Bug Type: GD related Operating System: Linux PHP Version: 4.3.2 New Comment:
CVS snapshot applied. Problem fixed. Previous Comments: ------------------------------------------------------------------------ [2003-08-03 05:21:46] mark at teckis dot com I have also had this problem with the ImageCopyMerge function and deduced that only the colour of the overlayed (source_image) pixel is used to determine the resultant colour. The destination image/pixel is totally ignored and just coloured relative to the overlay colour. Using a non 100 numeric for the opacity therefore just darkens the overlay colour proportionally (N% of 0-255,0-255,0-255 would always appear as though it was placed on a black dot 0,0,0 rather than whatever colour is really there) Note: This may well be a problem with the GD version rather than the PHP build as (I'm pretty sure) it only became apparent to me when changing from GD2.0.9 to GD2.0.12 I shall request my host to apply the snapshot. ------------------------------------------------------------------------ [2003-08-01 06:08:39] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-07-26 10:57:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Works fine in latest CVS. ------------------------------------------------------------------------ [2003-07-26 06:32:52] jakob at gosign dot de Description: ------------ ImageCopyMerge doesn't work in PHP 4.3.2. It seems as though the source image is ignored and instead a black image is used for merging the colors. The same script works in PHP 4.3.1 as expected. Reproduce code: --------------- $img = ImageCreateTrueColor(100, 100); ImageFill($img, 0, 0, ImageColorAllocate($img, 255, 255, 255)); $img2 = ImageCreateTrueColor(50, 50); ImageFill($img2, 0, 0, ImageColorAllocate($img2, 0, 0, 0)); ImageCopyMerge($img, $img2, 0, 0, 0, 0, 50, 50, 50); ImagePNG($img); Expected result: ---------------- A gray box. (50% black) Actual result: -------------- A black box. (100% black) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24816&edit=1
