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
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.