|  | Posted by Krustov on 02/25/06 16:50 
<comp.lang.php , Yannick Benoit , yanglike@sympatico.ca><_6PLf.7319$XZ3.342427@news20.bellglobal.com>
 <Fri, 24 Feb 2006 21:17:30 -0500>
 
 > Anyone know a function that could rotate a .jpg image 90 degree to the right
 > or left ?
 >
 
 Some old code that decides at random to rotate left or right .
 
 $zz=(rand()%6)+2; $xx=(rand()%2); $source=imagecreatefromjpeg($hold2);
 if ($xx==0) {$thumb=imagerotate($source,$zz,0);}
 if ($xx==1) {$thumb=imagerotate($source,-$zz,0);}
 ImageJPEG($thumb,$hold2); imagedestroy($source); imagedestroy($thumb);
 
 Change the $zz to 90 or whatever .
  Navigation: [Reply to this message] |