Some image functions are broken

From: Date: Fri, 29 Nov 2002 15:01:09 +0000
Subject: Some image functions are broken
Groups: php.dev 
Request: Send a blank email to php-dev+get-91921@lists.php.net to get a copy of this message
i was just about to create some image (ext/gd) tests while i found out that imagegd2 and imagefromgd functions are broken. I checked with versions 4.3 and cvs. - You can convert an image to gd but you cannot reload it. - You cannot create an gd2 image. - png -> jpeg and reverse is good. [marcus@zaphod php4-HEAD]$ make sapi/cli/php ; php -r 'imagegd(imagecreatefrompng($argv[1]), $argv[2]);' -- ext/gd/tests/test.png ext/gd/tests/test.gd make: `sapi/cli/php' is up to date. [marcus@zaphod php4-HEAD]$ make sapi/cli/php ; php -r 'imagegd2(imagecreatefrompng($argv[1]), $argv[2]);' -- ext/gd/tests/test.png ext/gd/tests/test.gd2 make: `sapi/cli/php' is up to date. Segmentation fault [marcus@zaphod php4-HEAD]$ make sapi/cli/php ; php -r 'imagepng(imagecreatefromgd($argv[1]), $argv[2]);' -- ext/gd/tests/test.gd ext/gd/tests/test1.png make: `sapi/cli/php' is up to date. Segmentation fault [marcus@zaphod php4-HEAD]$ make sapi/cli/php ; php -r 'imagejpeg(imagecreatefrompng($argv[1]), $argv[2]);' -- ext/gd/tests/test.png ext/gd/tests/test.jpeg make: `sapi/cli/php' is up to date. [marcus@zaphod php4-HEAD]$ make sapi/cli/php ; php -r 'imagepng(imagecreatefromjpeg($argv[1]), $argv[2]);' -- ext/gd/tests/test.jpeg ext/gd/tests/test.1.png make: `sapi/cli/php' is up to date. [marcus@zaphod php4-HEAD]$ cm
cmp         cmuwmtopbm
[marcus@zaphod php4-HEAD]$ cmp ext/gd/tests/test.png ext/gd/tests/test.1.png ext/gd/tests/test.png ext/gd/tests/test.1.png differ: char 36, line 3 They differ because jpeg compression losses. :-) But the result looks o.k. marcus

« previous php.dev (#91921) next »