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.
It is possible to set a maximum file size for JPEG images, using the setting jpeg_size. The JPEG quality will be calculated so that the file size doesn't go over the maximum value.
However, it is not possible to calculate the image dimensions in order to achieve a precise size. This would require too much calculations, and could't fit in the class as it is now.Reply
Re: Setting the max file size for RESULT picture new!
I'd like to have my pictures resized to 100 KB, 512 KB, 1 MB, etc.
Is it possible to tell the Upload-class the maximum size for the result pictures so widths/heights getting set automatically?
Regards
Douglas
However, it is not possible to calculate the image dimensions in order to achieve a precise size. This would require too much calculations, and could't fit in the class as it is now.
Thanks anyway.