php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44115 getimagesize errors for ico or favicon.ico files
Submitted: 2008-02-14 01:32 UTC Modified: 2008-02-23 01:00 UTC
From: xfreelancer at yahoo dot com Assigned:
Status: No Feedback Package: Feature/Change Request
PHP Version: 5.2.5 OS: CentOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xfreelancer at yahoo dot com
New email:
PHP Version: OS:

 

 [2008-02-14 01:32 UTC] xfreelancer at yahoo dot com
Description:
------------
Getimagesize still gives errors for .ico files or no information at all. Also, there is no predefined constant for this type of image files.
Considering that .ico is older than .png I believe that .ico should have full support.

Reproduce code:
---------------
$tmp='/tmp/favicon.ico';
$buffer=file_get_contents('http://www.favicon.com/favicon.ico');
file_put_contents($tmp,$buffer);
list($ox, $oy, $type, $attr) = getimagesize($tmp);
echo "ox={$ox}<br>oy={$oy}<br>type={$type}<br>attr={$attr}<br>size=".filesize($tmp)."<br>";


Expected result:
----------------
ox=16
oy=16
type=???
attr=
size=318

Actual result:
--------------
ox=
oy=
type=
attr=
size=318

getimagesize actually does not return any information at all about this image file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-15 15:41 UTC] felipe@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi

In NEWS file (PHP 5_3 - CVS):
- Added icon format support to getimagesize(). (Scott)
 [2008-02-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 18:01:30 2024 UTC