note 110166 added to imagick.setsize

From: Date: Tue, 25 Sep 2012 17:49:00 +0000
Subject: note 110166 added to imagick.setsize
Groups: php.notes 
Request: Send a blank email to php-notes+get-191018@lists.php.net to get a copy of this message
Using setSize before reading an image file tells ImageMagick to resize the image immediately on load - this can give a substantial increase in performance time and save memory and disk resources for large images: <?php $image = new Imagick(); $image->setSize(800,600); $image->readImage($file); ?> This might also save you having to call thumbnailImage to resize the image. On my server, this only made a difference with jpgs - pngs and gifs were loaded at full size which took much longer (30s or more compared to 6s for a similar sized jpg). ---- Server IP: 69.147.83.199 Probable Submitter: 46.64.53.229 ---- Manual Page -- http://www.php.net/manual/en/imagick.setsize.php Edit -- https://master.php.net/note/edit/110166 Del: integrated -- https://master.php.net/note/delete/110166/integrated Del: useless -- https://master.php.net/note/delete/110166/useless Del: bad code -- https://master.php.net/note/delete/110166/bad+code Del: spam -- https://master.php.net/note/delete/110166/spam Del: non-english -- https://master.php.net/note/delete/110166/non-english Del: in docs -- https://master.php.net/note/delete/110166/in+docs Del: other reasons-- https://master.php.net/note/delete/110166 Reject -- https://master.php.net/note/reject/110166 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191018) next »