php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64815 Rendering some image broken
Submitted: 2013-05-10 18:07 UTC Modified: 2013-05-22 15:14 UTC
From: adrianbjones at gmail dot com Assigned:
Status: Closed Package: GD related
PHP Version: 5.4.15 OS: Debian
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adrianbjones at gmail dot com
New email:
PHP Version: OS:

 

 [2013-05-10 18:07 UTC] adrianbjones at gmail dot com
Description:
------------
I am using PEAR Image_Canvas to dynamically generate some images. The same script 
has worked from PHP 4.x all the way through to 5.4.14. Basically the script layers 
several transparent png files together to make a combined image

I just upgraded to 5.4.15 and the images are no longing rendering properly. 
Certain elements are replaced by solid rectangles and others have a variety of 
color changes. It seems like it might be a transparency issue with PNG files, but 
not sure.

Reverting to 5.4.14 instantly fixes the images.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-16 19:44 UTC] aharvey@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

A reproduction script using GD directly would be extremely helpful, along with the configure lines used both in PHP 5.4.14 and 5.4.15 and any difference in libpng versions, please.
 [2013-05-16 19:44 UTC] aharvey@php.net
-Status: Open +Status: Feedback
 [2013-05-21 22:49 UTC] adrianbjones at gmail dot com
OK, finally figured out the issue with this, Sorry, it's not a PHP bug at all. 
There is a regex in PEAR Image_Canvas that looks for the version of GD. The new 
version of GD 2.1.0 was being matched by a poorly written regex that looked for 
version 1.x first. Image_Canvas only uses ImageCreateTrueColor if GD is version 
2.x, hence the color/transparency issues.

Anyway, all sorted now - I will file a bug with Image_Canvas, even though it is 
no longer being maintained.

Sorry to trouble you!
 [2013-05-21 22:49 UTC] adrianbjones at gmail dot com
-Status: Feedback +Status: Open
 [2013-05-22 15:14 UTC] adrianbjones at gmail dot com
Closing this
 [2013-05-22 15:14 UTC] adrianbjones at gmail dot com
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 07:03:34 2022 UTC