#29424 [Com]: Width and Height inverted for JPEG2000 files
| From: | tom at kornack dot com | Date: | Thu, 12 Aug 2004 15:40:02 +0000 |
| Subject: | #29424 [Com]: Width and Height inverted for JPEG2000 files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64502@lists.php.net to get a copy of this message | ||
ID: 29424
Comment by: tom at kornack dot com
Reported By: bertrand dot bourgier at free dot fr
Status: Open
Bug Type: GetImageSize related
Operating System: Windows 2000 Pro
PHP Version: 5.0.0
New Comment:
I have seen this with php 5.0.0 on Mac OS X. I just had
to code a kludge to fix this!
Previous Comments:
------------------------------------------------------------------------
[2004-07-28 11:50:08] bertrand dot bourgier at free dot fr
Description:
------------
Take a JPEG2000 file (indifferently JPC or JP2 format).
JPC format sample file:
http://www.crc.ricoh.com/~gormish/jpeg2000conformance/J2KP4files/codestreams_profile0/p0_04.j2k
JP2 format sample file:
http://www.crc.ricoh.com/~gormish/jpeg2000conformance/J2KP4files/testfiles_jp2/file1.jp2
I downloaded those 2 files so that I can do my tests locally and avoid
any network related issue.
Then, when I run 'getimagesize' on those JPEG2000 files, I get a
result, but the Width and Height information are inverted.
Reproduce code:
---------------
Test 1:
<?php
list($width, $height, $type, $attr) = getimagesize("p0_04.j2k");
echo "Width: $width<BR>Height: $height";
?>
Test 2:
<?php
list($width, $height, $type, $attr) = getimagesize("file1.jp2");
echo "Width: $width<BR>Height: $height";
?>
Expected result:
----------------
Test 1:
Width: 640
Height: 480
Test 2:
Width: 768
Height: 512
Actual result:
--------------
Test 1:
Width: 480
Height: 640
Test 2:
Width: 512
Height: 768
As you can see, Width and Height are inverted.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29424&edit=1