class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
$image = new Upload($cms_image["image_dir"].$cms_image["image_name"]); $image->preserve_transparency = false; $image->image_resize = true; $image->image_ratio_y = true; $image->image_x = $cms_image["max_width"]; //100 $image->image_convert = strtolower($cms_image["target_ext"]); $image->jpeg_quality = $cms_image["jpg_quality"]; //75 $image->file_new_name_body = $cms_image["thumb_name1"]; $image->Process($cms_image["thumb_dir"]);
where some Values comes out of my CMS, but think that they are valid - all other Variables are 'Default'