Resizing images in specified height & width while uploading files to the server. [php] /* Create a thumbnail of $srcFile and save it to $destFile. The thumbnail will be $width pixels. */ function createThumbnail($srcFile, $destFile, $new_w, $new_h, $quality = 75) { $thumbnail = ”; if (file_exists($srcFile) && isset($destFile)) { $size = getimagesize($srcFile); $old_x = $size[0]; …
Tag: Image upload
Permanent link to this article: https://blog.openshell.in/2011/09/resize-image-in-specified-height-width-while-upload/