note 78553 added to function.imagick-thumbnailimage
| From: | sgarner at expio dot co dot nz | Date: | Wed, 17 Oct 2007 05:11:56 +0000 |
| Subject: | note 78553 added to function.imagick-thumbnailimage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131446@lists.php.net to get a copy of this message | ||
With $fit == true, the image is resized proportionally so that its _smallest_ dimension matches the
width or height specified, NOT both.
For example, if you say thumbnailImage(400, 400, true), on an image of 1600x800, it will be resized
to 800x400, NOT 400x200 as you might expect.
The solution is to compare the original image's dimensions to the specified dimensions, and
substitute zero for the smaller dimension, and set $fit = false.
i.e.: thumbnailImage(400, 0, false) would resize that 1600x800 image to 400x200.
----
Server IP: 202.89.58.1
Probable Submitter: 203.89.165.59
----
Manual Page -- http://www.php.net/manual/en/function.imagick-thumbnailimage.php
Edit -- https://master.php.net/note/edit/78553
Del: integrated -- https://master.php.net/note/delete/78553/integrated
Del: useless -- https://master.php.net/note/delete/78553/useless
Del: bad code -- https://master.php.net/note/delete/78553/bad+code
Del: spam -- https://master.php.net/note/delete/78553/spam
Del: non-english -- https://master.php.net/note/delete/78553/non-english
Del: in docs -- https://master.php.net/note/delete/78553/in+docs
Del: other reasons-- https://master.php.net/note/delete/78553
Reject -- https://master.php.net/note/reject/78553
Search -- https://master.php.net/manage/user-notes.php