|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-21 10:34 UTC] tony2001@php.net
[2005-07-23 18:42 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 15:00:01 2025 UTC |
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.