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


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to