Bug #65148 [Opn->Fbk]: imagerotate may alter image dimensions
| From: | pajoye@php.net | Date: | Thu, 27 Jun 2013 20:25:37 +0000 |
| Subject: | Bug #65148 [Opn->Fbk]: imagerotate may alter image dimensions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179905@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65148&edit=1
ID: 65148
Updated by: pajoye@php.net
Reported by: imprec at gmail dot com
Summary: imagerotate may alter image dimensions
-Status: Open
+Status: Feedback
Type: Bug
Package: GD related
Operating System: Linux
PHP Version: 5.5.0
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2013-06-27 20:25:31] pajoye@php.net
Please try 5.5 snapshots, this bug should be gone.
------------------------------------------------------------------------
[2013-06-27 14:12:26] imprec at gmail dot com
Description:
------------
When rotating image with GD, image dimension may be different after the rotation.
For example, I expect a 320x240 image to be 240x320 after rotation. It may be
239x320.
Test script:
---------------
This bug happens with the following script :
(google.png file can be retrieved from https://raw.github.com/avalanche123/Imagine/develop/tests/Imagine/Fixtures/google.png)
$resource = imagecreatefrompng('google.png');
var_dump(imagesx($resource));
$resource = imagerotate($resource, -90, 0);
var_dump(imagesy($resource));
Expected result:
----------------
int(364)
int(364)
Actual result:
--------------
int(364)
int(363)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65148&edit=1