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.
Hi, I'm having trouble with resizing. I want to make sure uploaded images do not exceed 600px wide, but I don't want to convert smaller images to 600px.
I tried image_ratio_no_zoom_in = true but it doesn't seem to be working, I still end up with a 600px image if its smaller. Here's the relevant (I think) portion of the code:
I tried image_ratio_no_zoom_in = true but it doesn't seem to be working, I still end up with a 600px image if its smaller. Here's the relevant (I think) portion of the code:
if ($handle->uploaded) { $handle->file_safe_name = true; $handle->image_resize = true; $handle->image_ratio_no_zoom_in = true; $handle->image_ratio_y = true; $handle->image_x = 600; $handle->jpeg_quality = 100; $handle->image_convert = 'jpg'; $handle->file_overwrite = false; $handle->file_auto_rename = false; $handle->file_new_name_body = $new_file_name_body; $handle->Process($upload_directory);