From: paul at i3 dot co dot uk
Operating system: slackware
PHP version: 4.3.4
PHP Bug Type: GetImageSize related
Bug description: getimagesize doesn't return correct width and height for bmp files
Description:
------------
Contrary to 4.3.4 change log
Fixed width/height detection of bmp images using
getimagesize() function on big endian systems and added
code to retrieve bmp bit depth. (Ilia)
I still receive incorrect output when querying a local
.bmp.
Expected result:
----------------
When queried with imagemagick identify verbose returns
Image: example.bmp
Format: BMP (Microsoft Windows bitmap image)
Geometry: 800x560
Class: DirectClass
Type: true color
Depth: 8 bits-per-pixel component
Colors: 56670
Filesize: 1312kb
Interlace: None
Background Color: white
Border Color: #dfdfdf
Matte Color: grey74
Iterations: 0
Compression:
signature:
6b89fd02035b663968e3a0f127da0c0dc5e940e060446a21c40cb330
f0bbc5ce
Tainted: False
User Time: 0.0u
Elapsed Time: 0:01
Tested with 20 or so similar sized bmp file same problem
occurs.
Actual result:
--------------
files output using getimagesize returns
array(5) {
[0]=>
int(36700960)
[1]=>
int(1572865)
[2]=>
int(6)
[3]=>
string(33) "width="36700960" height="1572865""
["mime"]=>
string(9) "image/bmp"
}
--
Edit bug report at http://bugs.php.net/?id=26688&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26688&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26688&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26688&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26688&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26688&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26688&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26688&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26688&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26688&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26688&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26688&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26688&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26688&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26688&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26688&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26688&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26688&r=float