Bug #66516 [NEW]: getimagesize() function is returning swaped values of height and width.
| From: | milpas999 at gmail dot com | Date: | Sun, 19 Jan 2014 16:01:35 +0000 |
| Subject: | Bug #66516 [NEW]: getimagesize() function is returning swaped values of height and width. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183904@lists.php.net to get a copy of this message | ||
From: milpas999 at gmail dot com
Operating system: windows 8.1
PHP version: Irrelevant
Package: GetImageSize related
Bug Type: Bug
Bug description:getimagesize() function is returning swaped values of height and width.
Description:
------------
My objective is to upload an image and then to create a new image with
some other 'width X height' resizing parameters. Original image has
uploaded successfully, but when i am using getimagesize('local path of
original uploaded image') it is returning wrong values.
And this function is not working only for images of dimension '1836 X
3264'
original image dimension : 1836 X 3264
and when using getimagesize() for the image it returns
Array
(
[0] => 3264
[1] => 1836
[2] => 2
[3] => width="3264" height="1836"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
Same as Bug #29424. but i am unsing PHP 5.4.3 and bug reporter was
using PHP 5.0.0
Test script:
---------------
$source_image_path = '../sysimages/origimage/20131109_151445.jpg';
$arrrrr = getimagesize($source_image_path);
print("<pre>arrrrr :: ");
print_r($arrrrr);
print("</pre>");
Expected result:
----------------
Array
(
[0] => 1836
[1] => 3264
[2] => 2
[3] => width="1836" height="3264"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
Actual result:
--------------
Array
(
[0] => 3264
[1] => 1836
[2] => 2
[3] => width="3264" height="1836"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
--
Edit bug report at https://bugs.php.net/bug.php?id=66516&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66516&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66516&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66516&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66516&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66516&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66516&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66516&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66516&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66516&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66516&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66516&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66516&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66516&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66516&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66516&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66516&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66516&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66516&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66516&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66516&r=mysqlcfg