note 38775 added to function.imagecopyresampled
| From: | goldfever at rn2 dot php dot net | Date: | Tue, 06 Jan 2004 21:24:03 +0000 |
| Subject: | note 38775 added to function.imagecopyresampled | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63020@lists.php.net to get a copy of this message | ||
here's a simple image scaling snippet
hope it helps somebody. It uses a
single dimension and creates the other.
$im="someimage.jpg";
$max_width="300";
$image_details = getimagesize("$im");
$imagesize_x = $image_details[0];
$imagesize_y = $image_details[1];
$thumb_width=$max_width;
$thumb_height=(int)(($max_width*$imagesize_y)/imagesize_x);
----
Manual Page -- http://www.php.net/manual/en/function.imagecopyresampled.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38775
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38775&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38775&report=yes
Search -- http://master.php.net/manage/user-notes.php