numist/this-might-be-offensive — Issue #34: possible bug in isk.inc
Author: corbosman
Created: 2012-02-08 16:48:16+00:00
State: open

You added some code to isk.inc..

$max_dimension = 300;
if($image->getImageWidth() > $image->getImageHeight() && $image->getImageWidth() > $max_dimension) {
$image->resizeImage(0,$max_dimension, imagick::FILTER_UNDEFINED, 1, false);
} else if($image->getImageHeight() > $max_dimension) {
$image->resizeImage($max_dimension,0, imagick::FILTER_UNDEFINED, 1, false);
}

The top part of this if loop is supposed to change the height to 300, and the width to scale accordingly to something > 300. You added the && ... to make sure it's not already smaller than 300. But that means you need to check $image->getImageheight() in the first if part, and Width in the else