PHPThumb
PHPThumb copied to clipboard
height/width transposed in rotateImageNDegrees() function
There is an error in the function rotateImageNDegrees() in the file GdThumb.inc.php.
At line 546, we have:
$newWidth = $this->currentDimensions['height'];
$newHeight = $this->currentDimensions['width'];
This is incorrect, and reverses the height and width of an image once it's been rotated. This causes problems if you then attempt to determine the size of the image using the getCurrentDimensions() function. Instead, the code should read:
$newWidth = $this->currentDimensions['width'];
$newHeight = $this->currentDimensions['height'];
Thanks, that mistakes are hard to find :D