|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30281 returned size for WBMP is always 1x0
Submitted: 2004-09-29 21:25 UTC Modified: 2004-10-04 22:44 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: spam at batz dot org Assigned:
Status: Closed Package: GetImageSize related
PHP Version: 5.0.1 OS: Windows XP
Private report: No CVE-ID:
 [2004-09-29 21:25 UTC] spam at batz dot org
getimagesize returns always 1 as width and 0 as height for WBMP pictures. problem occurs on 4.3.8 and 4.3.9 as well.
WBMP/ICO can hold multiple frames with different sizes.

Reproduce code:
$imageinfo = getimagesize('favicon.ico');
echo "width:{$imageinfo[0]}<br>";
echo "height:{$imageinfo[1]}<br>";
echo "imagetype:{$imageinfo[2]}<br>";
echo "to show that the size is wrong:<br>";
echo "<img src=\"favicon.ico\">";

Expected result:
to show that the size is wrong:

Actual result:
to show that the size is wrong:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-30 03:16 UTC]
Please supply the image used.
 [2004-10-04 18:35 UTC] spam at batz dot org
Any file in ICO-format should do it. But you can just use as sample.
 [2004-10-04 22:44 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 04:01:30 2015 UTC