php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33794 imagerotate rotates only CCW
Submitted: 2005-07-21 04:37 UTC Modified: 2005-07-23 18:42 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: cooperny at si dot rr dot com Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5.1.0b3 OS: Win32
Private report: No CVE-ID: None
 [2005-07-21 04:37 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-21 10:34 UTC] tony2001@php.net
Assigned to the maintainer.
 [2005-07-23 18:42 UTC] pajoye@php.net
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC