#28375 [Opn->WFx]: getimagesize only checks global gif header
| From: | iliaa@php.net | Date: | Wed, 12 May 2004 17:03:41 +0000 |
| Subject: | #28375 [Opn->WFx]: getimagesize only checks global gif header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-59548@lists.php.net to get a copy of this message | ||
ID: 28375
Updated by: iliaa@php.net
Reported By: scottmacvicar at ntlworld dot com
-Status: Open
+Status: Wont fix
Bug Type: GetImageSize related
Operating System: *
PHP Version: 4CVS-2004-05-12 (stable)
New Comment:
Scanning the entire gif file would be too slow. It would
also require the retrieval of the entire file rather then
just the header, which would be rather slow if the file is
located on a remote server.
Previous Comments:
------------------------------------------------------------------------
[2004-05-12 19:01:15] scottmacvicar at ntlworld dot com
Description:
------------
A getimagesize can return a wrong value if corruption or intentional
editing has changed the values held in the global header for the gif.
It is possible to find the correct value by scanning through each frame
and looking at the local image descriptor values for width and height
and returning the largest value.
Both Mozilla and IE do this as standard and ignore the global height
and width.
If anyone wants a sample gif I can email them it.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28375&edit=1