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.
No, it is not possible to keep the entire image if you want to fill in a precise dimension, and keep the ratio. One elegant way to do that is to use image_ratio_crop, but if you want to keep the image, and fill the rest with a color, you will need something like image_ratio_fill, and a way to set the background color.
It is a good idea, I will probably implement it in the next release.
However, I am not sure it is very wise, since you can just display your pics in a DIV on your page. the DIV can have a fixed dimension, and you center the picture in the DIV. But the feature might be useful in some cases, so I'll add it in.Reply
It is a good idea, I will probably implement it in the next release.
However, I am not sure it is very wise, since you can just display your pics in a DIV on your page. the DIV can have a fixed dimension, and you center the picture in the DIV.
But the feature might be useful in some cases, so I'll add it in.