#33794 [Asn->Csd]: imagerotate rotates only CCW

From: Date: Sat, 23 Jul 2005 16:42:09 +0000
Subject: #33794 [Asn->Csd]: imagerotate rotates only CCW
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82362@lists.php.net to get a copy of this message
ID: 33794 Updated by: pajoye@php.net Reported By: cooperny at si dot rr dot com -Status: Assigned +Status: Closed Bug Type: GD related Operating System: Win32 PHP Version: 5.1.0b3 Assigned To: pajoye New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Thanks for the notice. --Pierre Previous Comments: ------------------------------------------------------------------------ [2005-07-21 10:34:07] tony2001@php.net Assigned to the maintainer. ------------------------------------------------------------------------ [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

« previous php.bugs (#82362) next »