Bug #11814 Updated: ImageCreate not backward compatible
| From: | wez@php.net | Date: | Sun, 01 Jul 2001 10:52:32 +0000 |
| Subject: | Bug #11814 Updated: ImageCreate not backward compatible | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-58605@lists.php.net to get a copy of this message | ||
ID: 11814
Updated by: wez
Reported By: steve@stevegodwin.com
Status: Open
Bug Type: GD related
Operating system:
PHP Version: 4.0.6
Assigned To:
Comments:
This might actually be a bug in GD 2.0; there are a number of bugs in palette based images that will
be fixed in the next release.
--Wez.
Previous Comments:
---------------------------------------------------------------------------
[2001-06-30 19:45:10] steve@stevegodwin.com
This script worked fine in 4.0.4, but produces a bad color-shift in 4.0.6:
$srcImage = ImageCreateFromJPEG( $srcImgName );
$dstImage = ImageCreate( $dstWidth, $dstHeight );
ImageCopyResized($dstImage, $srcImage, 0, 0, 0, 0,
$dstWidth, $dstHeight, $srcWidth, $srcHeight);
ImageJPEG( $dstImage, $dstImgName );
Using the new 4.0.6 function ImageCreateTrueColor() instead of ImageCreate() on line 2 fixes the
problem.
I wanted to let you know about it in case the underlying changes in GD that caused this problem
might cause other similar problems.
It might be useful to return ImageCreate to its previous functionality and add an ImageCreatePalette
to go with ImageCreateTrueColor. Just a thought.
Thanks.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11814&edit=2