From: cooperny at si dot rr dot com Operating system: Win32 PHP version: 5.1.0b3 PHP Bug Type: GD related Bug description: imagerotate rotates only CCW
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 bug report at http://bugs.php.net/?id=33794&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33794&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33794&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33794&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33794&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33794&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33794&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33794&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33794&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33794&r=support Expected behavior: http://bugs.php.net/fix.php?id=33794&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33794&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33794&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33794&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33794&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33794&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33794&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33794&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33794&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33794&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33794&r=mysqlcfg