I have a function that [is meant to] check if an image is greater than a certain width and height, and if it is, downsample it. The checking part works fine. Downsampling is happening though. Here's what I've got ($file = "/somedirectory/photo.jpg"):

$src_img=imagecreatefromJPEG($file);
$dst_img=imagecreatetruecolor($new_width,$new_height);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$siz e[0],$size[1]);
imagejpeg($dst_img,$file,$img_quality);


Any ideas?

Thanks.

...Rene

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to