Bug #71316 [NEW]: libpng warning from imagecreatefromstring

From: Date: Fri, 08 Jan 2016 22:07:30 +0000
Subject: Bug #71316 [NEW]: libpng warning from imagecreatefromstring
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198534@lists.php.net to get a copy of this message
From:             humbads at alum dot mit dot edu
Operating system: FreeBSD 10.2
PHP version:      5.6.17
Package:          GD related
Bug Type:         Bug
Bug description:libpng warning from imagecreatefromstring

Description:
------------
imagecreatefromstring is writing a warning message to stderr that can
not be suppressed by '@' or captured by the error handler.  It should
emit a proper PHP warning instead.

I have the following version of libPNG:

php -i | grep -i libpng
libPNG Version => 1.6.19+apng

To run the test script, download the sample PNG image from here:
http://imgbox.com/BzOXLiOr

Note: libPNG 1.5.18 on PHP 5.6.17 for Windows does not have this
problem.

Test script:
---------------
php -r
'@var_dump(imagecreatefromstring(file_get_contents("1CCHOHSULGF78KW.png")));'



Expected result:
----------------
resource(6) of type (gd)

Actual result:
--------------
libpng warning: iCCP: known incorrect sRGB profile
resource(6) of type (gd)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=71316&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71316&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71316&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71316&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71316&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71316&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71316&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71316&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71316&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71316&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71316&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71316&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71316&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71316&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71316&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71316&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71316&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71316&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71316&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71316&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71316&r=mysqlcfg



Thread (16 messages)

« previous php.bugs (#198534) next »