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.
Yes, please send me any code you do, regardless of the quality :)
As for the settings, it looks to me that aspect_crop and aspect_fill won't be needed, since it will size up the picture to a number of pixel, conserving the ratio. But it won't actually have to crop or fill anything since you want to keep the original ratio.
Wouldn't it be more a case for a new setting such as image_ratio_pixels, which would be an integer (the number of pixels)? That setting will resize the picture, conserving ratio, but increasing or reducing the dimensions so that the number of pixels is (approximatively) met.Reply
As for the settings, it looks to me that aspect_crop and aspect_fill won't be needed, since it will size up the picture to a number of pixel, conserving the ratio. But it won't actually have to crop or fill anything since you want to keep the original ratio.
Wouldn't it be more a case for a new setting such as image_ratio_pixels, which would be an integer (the number of pixels)? That setting will resize the picture, conserving ratio, but increasing or reducing the dimensions so that the number of pixels is (approximatively) met.
Actually it should probably be called a "resize to area", right? since the area of a rectangle is height*width.
sqrt does the trick!
Thanks for the contribution.