Publisher review:Image upload and resize - this little script resizes your uploaded image on the fly and saves it as thumbnail. This little script resizes your uploaded image on the fly and saves it as thumbnail. Respects aspect ratio and doesn't distort your image if$_POST['Submit'])) { $size = 150; // the thumbnail height $filedir = 'pics/'; // the directory for the original image $thumbdir = 'pics/'; // the directory for the thumbnail image $prefix = 'small_'; // the prefix to be added to the original name $maxfile = '2000000'; $mode = '0666'; $userfile_name = $_FILES['image']['name']; $userfile_tmp = $_FILES['image']['tmp_name']; $userfile_size = $_FILES['image']['size']; $userfile_type = $_FILES['image']['type']; $_FILES['image']['name'])) { $prod_img = $filedir.$userfile_name; $prod_img_thumb = $thumbdir.$prefix.$userfile_name; move_uploaded_file($userfile_tmp, $prod_img); chmod ($prod_img, octdec($mode)); $sizes = getimagesize($prod_img); $aspect_ratio = $sizes[1]/$sizes[0]; if ($sizes[1] ; } ?>(isset(if (isset(
image upload and resize is a PHP script for Snippets scripts design by fundisom.
It runs on following operating system: .
Operating system: