note 30072 added to function.imagecopyresampled
| From: | webmaster at fredrickville dot com | Date: | Wed, 05 Mar 2003 19:32:42 +0000 |
| Subject: | note 30072 added to function.imagecopyresampled | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44892@lists.php.net to get a copy of this message | ||
If you're trying to make a thumbnail gallery with pictures of different sizes and shapes, you
can use this to scale all the images to have the save width, but have different heights so as not to
distort the image:
$xsize = $xsize;
$ysize = (((imagesy($src))*($xsize))/imagesx($src));
$src would be the image you're resizing,
$xsize would be the width that you'd like,
all the rest is taken care of.
--
http://www.php.net/manual/en/function.imagecopyresampled.php
http://master.php.net/manage/user-notes.php?action=edit+30072
http://master.php.net/manage/user-notes.php?action=delete+30072
http://master.php.net/manage/user-notes.php?action=reject+30072