#33794 [Opn->Asn]: imagerotate rotates only CCW
| From: | tony2001@php.net | Date: | Thu, 21 Jul 2005 08:34:08 +0000 |
| Subject: | #33794 [Opn->Asn]: imagerotate rotates only CCW | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82257@lists.php.net to get a copy of this message | ||
ID: 33794
Updated by: tony2001@php.net
Reported By: cooperny at si dot rr dot com
-Status: Open
+Status: Assigned
Bug Type: GD related
Operating System: Win32
PHP Version: 5.1.0b3
-Assigned To:
+Assigned To: pajoye
New Comment:
Assigned to the maintainer.
Previous Comments:
------------------------------------------------------------------------
[2005-07-21 04:37:55] cooperny at si dot rr dot com
Description:
------------
After upgrading from php 5.0.4 on 5.1.0b3 imagerotate has wrong
behavior, it rotates CCW no matter -90 or 90 or 270 or -270 specified
as angle. In the code provided I rotate jpeg -90.0 which means CW
rotatation (default + is CCW), and the result image is rotated CCW
instead.
Reproduce code:
---------------
<?php
$img = imagecreatefromjpeg("test.jpg");
$sx = imagesx($img);
$sy = imagesy($img);
$newImg = imagecreatetruecolor($sx, $sy);
imagecopy($newImg,$img,0,0,0,0,$sx,$sy);
imagedestroy($img);
$img = imagerotate($newImg,-90.0,0);
imagejpeg( $img, "result.jpg");
?>
Expected result:
----------------
It rotates image CW on 90.0 deg.
Actual result:
--------------
It Rotates image CCW on 90.0 deg.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33794&edit=1