Bug #81321 [NEW]: incorrect image on save
| From: | andrei at anleaf dot com | Date: | Sun, 01 Aug 2021 21:30:16 +0000 |
| Subject: | Bug #81321 [NEW]: incorrect image on save | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-235518@lists.php.net to get a copy of this message | ||
From: andrei at anleaf dot com
Operating system: CentOs 7.9
PHP version: 7.4.22
Package: *Graphics related
Bug Type: Bug
Bug description:incorrect image on save
Description:
------------
problem with opening and saving some png images using
imagecreatefrompng() and then save it using imagepng($image,$file).
Image opens OK but when saved, the resulting image has broken alpha
channel.
Happens with some png images.
Input image to test is here
https://www.dropbox.com/s/c6ne72bobrt2iz9/logo_orig.png?dl=0
Resulting image with problem is here
https://www.dropbox.com/s/xs4b4bv6208hiua/logo_new.png?dl=0
Test script:
---------------
$im = imagecreatefrompng("logo_orig.png");
imagepng($im,"logo_new.png");
imagedestroy($im);
Expected result:
----------------
saved image should look the same as an input image
Actual result:
--------------
saved image is completely distorted.
--
Edit bug report at https://bugs.php.net/bug.php?id=81321&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81321&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81321&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81321&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81321&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81321&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81321&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81321&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81321&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81321&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81321&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81321&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81321&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81321&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81321&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81321&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81321&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81321&r=mysqlcfg