Date: 06/30/01
- Next message: chrism: "[PHP-DEV] switch, equality and preg_match"
- Previous message: steve <email protected>: "[PHP-DEV] Bug #11813: ImageGammaCorrect no longer works"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: steve <email protected>
Operating system: Win NT 4.0
PHP version: 4.0.6
PHP Bug Type: *Graphics related
Bug description: ImageCreate not backward compatible
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.
-- Edit Bug report at: http://bugs.php.net/?id=11814&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: chrism: "[PHP-DEV] switch, equality and preg_match"
- Previous message: steve <email protected>: "[PHP-DEV] Bug #11813: ImageGammaCorrect no longer works"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

