0
我使用的是简单的图像大小调整梅索德PHP的图像大小调整与低质量
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p, null, 100);
Eventhoug我给了质量最高,当它涉及到更小的图像尺寸创建图像,生成的图像是非常差的质量(原始500px到新的100px)。
有没有其他方法可以提高图像质量?