note 101164 added to function.imagick-flattenimages

From: Date: Tue, 30 Nov 2010 16:29:34 +0000
Subject: note 101164 added to function.imagick-flattenimages
Groups: php.notes 
Request: Send a blank email to php-notes+get-174487@lists.php.net to get a copy of this message
Note that the function returns an Imagick object and does not modify the existing object. Below is my code for converting a PNG with transparency into a JPG with a background color. This code illustrates the difference. <?php $im = new Imagick('image.png'); $im->setImageBackgroundColor('white'); $im->flattenImages(); // This does not do anything. $im = $im->flattenImages(); // Use this instead. $im->setImageFormat('jpg'); $im->writeImage('image.jpg'); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 199.253.16.1 ---- Manual Page -- http://www.php.net/manual/en/function.imagick-flattenimages.php Edit -- https://master.php.net/note/edit/101164 Del: integrated -- https://master.php.net/note/delete/101164/integrated Del: useless -- https://master.php.net/note/delete/101164/useless Del: bad code -- https://master.php.net/note/delete/101164/bad+code Del: spam -- https://master.php.net/note/delete/101164/spam Del: non-english -- https://master.php.net/note/delete/101164/non-english Del: in docs -- https://master.php.net/note/delete/101164/in+docs Del: other reasons-- https://master.php.net/note/delete/101164 Reject -- https://master.php.net/note/reject/101164 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174487) next »