joomla/joomla-platform — Issue #708: jimage division by zero
Author: romacron
Created: 2012-01-05 16:42:50+00:00
State: open

function prepareDimensions
form line: 665

if ($scaleMethod == JImage::SCALE_INSIDE)
{
$ratio = ($rx > $ry) ? $rx : $ry;
}
else
{
$ratio = ($rx < $ry) ? $rx : $ry;
}
is width or height 0 an error will be produzed

an Idea:
For Web-development/Administration in many cases i need an image-stack with same width or same height.
this harmonize the visible s for the website user.

perhaps we can build in an decision "is only one value 0" the image will be resized to the opposite value.