note 96836 added to function.imagick-setcompressionquality

From: Date: Thu, 18 Mar 2010 10:59:33 +0000
Subject: note 96836 added to function.imagick-setcompressionquality
Groups: php.notes 
Request: Send a blank email to php-notes+get-167168@lists.php.net to get a copy of this message
A note for people who just couldn't get this working.. With PHP 5.1.6, the below works: $img->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: $img->setImageCompression(Imagick::COMPRESSION_JPEG); $img->setImageCompressionQuality(80); and this is backwards compatible (Works on PHP 5.1.6 as well as 5.2.10) ---- Server IP: 69.147.83.197 Probable Submitter: 122.166.2.67 ---- Manual Page -- http://www.php.net/manual/en/function.imagick-setcompressionquality.php Edit -- https://master.php.net/note/edit/96836 Del: integrated -- https://master.php.net/note/delete/96836/integrated Del: useless -- https://master.php.net/note/delete/96836/useless Del: bad code -- https://master.php.net/note/delete/96836/bad+code Del: spam -- https://master.php.net/note/delete/96836/spam Del: non-english -- https://master.php.net/note/delete/96836/non-english Del: in docs -- https://master.php.net/note/delete/96836/in+docs Del: other reasons-- https://master.php.net/note/delete/96836 Reject -- https://master.php.net/note/reject/96836 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167168) next »