Bug 149946

Summary: PHP GD ImageCopyMerge broken
Product: Red Hat Enterprise Linux 3 Reporter: Samuel Stringham <me>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: daryllafferty
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://bugs.php.net/bug.php?id=23808
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-28 18:53:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for the PHP SPEC file
none
Patch to fix the ImageCopyMerge function. none

Description Samuel Stringham 2005-02-28 22:34:12 UTC
Description of problem:

The PHP version that is shipped with RedHat ES3 has a bug in thi GD
imagecopymerge function, making that function unusable.  This has been
fixed upstream.  Bug information is located here:

http://bugs.php.net/bug.php?id=23808

Version-Release number of selected component (if applicable):

# rpm -q php 
php-4.3.2-19.ent

How reproducible:

100%

Steps to Reproduce:

create a file called test.php in a websites document root:

<?php
$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);
?>

wget this php file, rename it to test.png , then xv it.
  
Actual results:

A black box

Expected results:

A grey box

Additional info:

Patches attached.

Comment 1 Samuel Stringham 2005-02-28 22:35:48 UTC
Created attachment 111506 [details]
Patch for the PHP SPEC file

Comment 2 Samuel Stringham 2005-02-28 22:37:31 UTC
Created attachment 111507 [details]
Patch to fix the ImageCopyMerge function.

Comment 3 Joe Orton 2005-03-01 11:06:34 UTC
Thanks for the contribution, Samuel.

Comment 4 Daryl 2005-03-16 19:58:40 UTC
daryllafferty

Comment 5 Josh Bressers 2005-04-28 18:53:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-405.html