Edit report at https://bugs.php.net/bug.php?id=65148&edit=1

 ID:                 65148
 User updated by:    imprec at gmail dot com
 Reported by:        imprec at gmail dot com
 Summary:            imagerotate may alter image dimensions
-Status:             Feedback
+Status:             Open
 Type:               Bug
 Package:            GD related
 Operating System:   Linux
 PHP Version:        5.5.0
 Block user comment: N
 Private report:     N

 New Comment:

I tested and reproduced the issue with PHP55-201306280830


Previous Comments:
------------------------------------------------------------------------
[2013-06-27 20:25:31] paj...@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

Reply via email to