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.
Right, I want to be able to resize images easily to a certain total amount of pixels.
Let's say that my "optimal size" is something like 640x480 = 307200 pixels.
All pictures that have the same aspect ratio will be sized to 640x480 or 480x640.
But pictures with other aspects should be resized to have as many pixels (as good as possible).. for example an image that is 720x480 (= 345600 pixels, dvd size) it should be resized down to something like 679x453 = 307587 pixels.
Let's say that my "optimal size" is something like 640x480 = 307200 pixels.
All pictures that have the same aspect ratio will be sized to 640x480 or 480x640.
But pictures with other aspects should be resized to have as many pixels (as good as possible).. for example an image that is 720x480 (= 345600 pixels, dvd size) it should be resized down to something like 679x453 = 307587 pixels.
Am I making sense?