イメージマジックのsetCompressionQualityが効かない

setCompressionQuality

ではなく

setImageCompressionQuality

を使いましょう


http://jp1.php.net/manual/ja/imagick.setcompressionquality.php

A note for people who just couldn't get this working..

With PHP 5.1.6, the below works:

setCompression(Imagick::COMPRESSION_JPEG);
$img->setCompressionQuality(80);
?>

However, with higher versions of PHP (I tried on PHP 5.2.10), the code has no effect (and there are no exceptions or warnings thrown by Imagick as well).

The code that works instead is:

setImageCompression(Imagick::COMPRESSION_JPEG);
$img->setImageCompressionQuality(80);
?>

and this is backwards compatible (Works on PHP 5.1.6 as well as 5.2.10)