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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 20:01:26 2024 UTC