php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28432 getimagesize return incorect width & height
Submitted: 2004-05-18 14:36 UTC Modified: 2004-05-18 16:16 UTC
From: young@php.net Assigned:
Status: Wont fix Package: GetImageSize related
PHP Version: 4.3.6 OS: FreeBSD 4.6-STABLE
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
23 + 50 = ?
Subscribe to this entry?

 
 [2004-05-18 14:36 UTC] young@php.net
Description:
------------
Image: http://young.org.ua/image.gif

PHP code:
<?php
print_r(getimagesize("image.gif"));
?>

Result:
Array
(
    [0] => 128
    [1] => 128
    [2] => 1
    [3] => width="128" height="128"
    [bits] => 8
    [channels] => 3
    [mime] => image/gif
)


Image Magic info:
im40a9f63a60720_2.gif GIF 80x124+24+4 PseudoClass 256c 8-bit 11.8k 0.0u 0:01

AcdSee info:
80x124

Wich information about image size is correct?
And why i get this difference?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-18 16:16 UTC] iliaa@php.net
The problem is the result of a rather peculiar image. The 
image dimensions are 80x124 but the effective canvas size 
according to gif header is 128x128, which is what PHP is 
returning. You can get this data via ImageMagic by doing 
identify -verbose image.gif | grep geometry. PHP returns 
this field since this represents the overall image 
dimensions, returning individual image sizes could result 
in incorrect data for animated gifs. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC