note 41130 added to function.getimagesize
| From: | MagicalTuxatFF dot st at rn2 dot php dot net | Date: | Wed, 31 Mar 2004 08:35:06 +0000 |
| Subject: | note 41130 added to function.getimagesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67408@lists.php.net to get a copy of this message | ||
simm posted something interesting about imagick, but usually calling an external binary is not the
best way.
You can use the Imagick PHP module . With it, you do not even need to get the image size to generate
thubnails...
Here's the code I used :
<?php
$imh=imagick_readimage($image);
imagick_scale($imh,GALLERY_THUMBNAILWIDTH,GALLERY_THUMBNAILHEIGHT);
imagick_writeimage($imh,$image_thumb);
?>
(I noticed that some hosting companies are now providing the imagick module by default. Using it
allows you to accept any type of image from your visitors. Maybe it will be documented on the
official PHP website one day or another? )
----
Manual Page -- http://www.php.net/manual/en/function.getimagesize.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41130
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41130&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41130&report=yes
Search -- http://master.php.net/manage/user-notes.php