#19817 [Opn]: ImageCreateFromGD2() doesnt recognize uncompressed .gd2 images

From: Date: Fri, 11 Oct 2002 11:15:55 +0000
Subject: #19817 [Opn]: ImageCreateFromGD2() doesnt recognize uncompressed .gd2 images
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22147@lists.php.net to get a copy of this message
ID: 19817 Updated by: mfischer@php.net Reported By: sprice@wisc.edu Status: Open Bug Type: GD related Operating System: Darwin 6.1 (Mac 10.2.1) PHP Version: 4CVS-2002-10-08 New Comment: Did test http://144.92.10.251/riverdata/images/uncompressed_med.gd2 and got the following: $ php 19817.php Error from seek: 25 Warning: imagecreatefromgd2part() [http://www.php.net/function.imagecreatefromgd2part]: 'uncompressed_med.gd2' is not a valid GD2 file in /home/mfischer/src/php/bugs/gd/19817.php on line 7 /home/mfischer/src/php/bugs/gd/19817.php(7) : Warning - imagecreatefromgd2part() [http://www.php.net/function.imagecreatefromgd2part]: 'uncompressed_med.gd2' is not a valid GD2 file Warning: imagecopy(): supplied argument is not a valid Image resource in /home/mfischer/src/php/bugs/gd/19817.php on line 10 /home/mfischer/src/php/bugs/gd/19817.php(10) : Warning - imagecopy(): supplied argument is not a valid Image resource Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/mfischer/src/php/bugs/gd/19817.php on line 11 /home/mfischer/src/php/bugs/gd/19817.php(11) : Warning - imagedestroy(): supplied argument is not a valid Image resource PNG IHDR vpkIDATxí×1 À°Ïà¢$ [binary scumm] The interesting thing I think is "Error from seek: 25" which actually comes from the bundled libgd from libgd/gd_gd2.c from gdImageCreateFromGd2PartCtx, line 584: if (gdSeek (in, dpos) != 0) { printf ("Error from seek: %d\n", errno); goto fail2; }; Error code 25 means "Inappropriate ioctl for device", no idea why this happens though. Maybe a problem related from mixing PHP Streams and native access to FILE fd's ? Previous Comments: ------------------------------------------------------------------------ [2002-10-10 11:10:38] kalowsky@php.net shhhh, don't prove to me that I need more sleep than I'm getting ;) okay nm that bt request... ------------------------------------------------------------------------ [2002-10-10 10:21:59] sprice@wisc.edu Will a backtrace work? PHP isn't crashing, just giving an error. ------------------------------------------------------------------------ [2002-10-10 10:08:48] kalowsky@php.net I'm going to say.. it's probably not an OSX/Darwin issue. GD is GD, and it's been proven to be buggy in the past. Although my hunting time is limited, I'll try to look at it later tonight. Can you by any chance include a backtrace for this? ------------------------------------------------------------------------ [2002-10-10 10:08:40] sprice@wisc.edu I have added an uncompressed version of the map at the site. It is called "uncompressed_med.gd2" If you are interested in where I got these huge world images, I got them from a nasa site. You can download them if you would like :-) To give credit where it is due: http://visibleearth.nasa.gov/cgi-bin/viewrecord?11656 ------------------------------------------------------------------------ [2002-10-10 09:39:06] sprice@wisc.edu I have added an uncompressed version of the map at the site. It is called "uncompressed_med.gd2" If you are interested in where I got these huge world images, I got them from a nasa site. You can download them if you would like :-) To give credit where it is due: http://visibleearth.nasa.gov/cgi-bin/viewrecord?11656 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19817 -- Edit this bug report at http://bugs.php.net/?id=19817&edit=1

« previous php.bugs (#22147) next »