note 130530 added to imagick.setimagecompression

From: Date: Fri, 24 Oct 2025 08:22:27 +0000
Subject: note 130530 added to imagick.setimagecompression
Groups: php.notes 
Request: Send a blank email to php-notes+get-222398@lists.php.net to get a copy of this message
Note that the behaviour of this function seems to have changed since extension version 3.6.0 which updated the imagemagick version which this is compiled against from 7.0.7-11 to 7.1.0-13. Previously, you could do the following: <?php $im = new Imagick(); $im->readImage('rose:'); $im->setImageCompression(Imagick::COMPRESSION_LZW); $im->writeImage('rose_compressed_lzw.tiff'); ?> And you would get a compressed TIFF. Now, you have to use: <?php $im = new Imagick(); $im->readImage('rose:'); $im->setCompression(Imagick::COMPRESSION_LZW); $im->writeImage('rose_compressed_lzw.tiff'); ?> As such, I'm not 100% sure what the setImageCompression actually does anymore. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 2a00:23a8:41d4:8101:18d5:4331:f42c:992c) ---- Manual Page -- https://php.net/manual/en/imagick.setimagecompression.php Edit -- https://main.php.net/note/edit/130530 Del: integrated -- https://main.php.net/note/delete/130530/integrated Del: useless -- https://main.php.net/note/delete/130530/useless Del: bad code -- https://main.php.net/note/delete/130530/bad+code Del: spam -- https://main.php.net/note/delete/130530/spam Del: non-english -- https://main.php.net/note/delete/130530/non-english Del: in docs -- https://main.php.net/note/delete/130530/in+docs Del: other reasons-- https://main.php.net/note/delete/130530 Reject -- https://main.php.net/note/reject/130530 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#222398) next »