If somebody else has the same Problem: As a workaround i use:
$width_factor = $w / 500;
$height_factor = $h / 500;
if ($width_factor > $height_factor)
{
$nw = round($w / $width_factor);
$nh = round($h / $width_factor);
}
else
{
$nw = round($w / $height_factor);
$nh = round($h / $height_factor);
}
$ni=imagecreatetruecolor($nw,$nh);
ImageCopyResampled($ni,$im,0,0,0,0,$nw,$nh,$w,$h);
UnsharpMask($ni);
|