no... there is no such thing. GEES!
here is the code:
if($new_photo != 'none') {
$array = getimagesize($new_photo);
$im = 0;
if($array[2] == 2) $im = ImageCreateFromJpeg($new_photo);
if($im) {
exec("c:\imagemagick\convert -geometry 100x100 $new_photo $upload_file_path");
} else {
echo "<p align='center'><b>could not upload new photo</b><br />only jpg files are allowed</p>\n";
}
}
this is assuming you have imagemagick installed...
here is how to do it with GDlib:
if($new_photo != 'none') {
$array = getimagesize($new_photo);
$original_width = $array[0];
$original_height = $array[1];
$im = 0;
if($array[2] == 2) {
$im = ImageCreateFromJpeg($new_photo);
} elseif($array[2] == 3) {
$im = ImageCreateFromPng($new_photo);
}
if($im) {
if($original_width > $original_height) {
$thumbnail_height = floor((100 $original_height) / $original_width);
$thumbnail_width = 100;
} else {
$thumbnail_width = floor((100 $original_width) / $original_height);
$thumbnail_height = 100;
}
$thumbnail = imagecreate($thumbnail_width, $thumbnail_height);
imagecopyresized($thumbnail, $im, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $original_width, $original_height);
imagejpeg($thumbnail, $file_path_for_upload);
hope that helps.... RTFM!!!!!!!!