any idee what is the probleem ?
if( $hw[0] > $hw[1]) {
if (intval($options[1]) < $hw[0]) {
$image['width'] = intval($options[1]);
$image['height'] = $hw[1] * ($image['width'] / $hw[0]);
} else {
$image['width'] = $hw[0];
$image['height'] = $hw[1];
}
} else {
if (intval($options[1]) < $hw[1]) {
$image['height'] = intval($options[1]);
$image['width'] = $hw[0] * ($image['height'] / $hw[1]);
} else {
$image['width'] = $hw[0];
$image['height'] = $hw[1];
}
}
if (intval($options[1]) < $hw[0]) {
$image['width'] = intval($options[1]);
$image['height'] = $hw[1] * ($image['width'] / $hw[0]);
} else {
$image['width'] = $hw[0];
$image['height'] = $hw[1];
}