note 38775 deleted from function.imagecopyresampled by aidan
| From: | aidan@php.net | Date: | Mon, 04 Oct 2004 09:43:46 +0000 |
| Subject: | note 38775 deleted from function.imagecopyresampled by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77948@lists.php.net to get a copy of this message | ||
Note Submitter: goldfever
----
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);