src/gallery/phpthumb/GdThumb.inc.php
public function rotateImageNDegrees ($degrees)
	{
		if (!is_numeric($degrees))
		{
			throw new InvalidArgumentException('$degrees must be numeric');
		}
		
		if (!function_exists('imagerotate'))
		{
			throw new RuntimeException('Your version of GD does not support image rotation.');
		}
		
		$this->workingImage = imagerotate($this->oldImage, $degrees, 0);
    	
		$newWidth 							= $this->currentDimensions['height'];
    	$newHeight 							= $this->currentDimensions['width'];
		$this->oldImage 					= $this->workingImage;
		$this->currentDimensions['width'] 	= $newWidth;
		$this->currentDimensions['height'] 	= $newHeight;
		
		return $this;
	}
public function rotateImageNDegrees ($degrees)
	{
		if (!is_numeric($degrees))
		{
			throw new InvalidArgumentException('$degrees must be numeric');
		}
		
		if (!function_exists('imagerotate'))
		{
			throw new RuntimeException('Your version of GD does not support image rotation.');
		}
		
		$this->workingImage = imagerotate($this->oldImage, $degrees, 0);
    	
		$newWidth 							= $this->currentDimensions['height'];
    	$newHeight 							= $this->currentDimensions['width'];
		$this->oldImage 					= $this->workingImage;
		$this->currentDimensions['width'] 	= $newWidth;
		$this->currentDimensions['height'] 	= $newHeight;
		
		return $this;
	}
public function rotateImageNDegrees ( $ degrees ) { if ( ! is_numeric ( $ degrees ) ) { throw new InvalidArgumentException ( '$degrees must be numeric' ) ; } if ( ! function_exists ( 'imagerotate' ) ) { throw new RuntimeException ( 'Your version of GD does not support image rotation.' ) ; } $ this -> workingImage = imagerotate ( $ this -> oldImage , $ degrees , 0 ) ; $ newWidth = $ this -> currentDimensions [ 'height' ] ; $ newHeight = $ this -> currentDimensions [ 'width' ] ; $ this -> oldImage = $ this -> workingImage ; $ this -> currentDimensions [ 'width' ] = $ newWidth ; $ this -> currentDimensions [ 'height' ] = $ newHeight ; return $ this ; }
Rotates image specified number of degrees

@param int $degrees
@return GdThumb
Rotates image specified number of degrees