Jump to content

Automatically resizing an image to any format


vineld

Recommended Posts

What method do you use if you want to automatically resize an uploaded image to any given format (that fits within it of course but isn't necessarily of the same proportions)?

 

What I do right now is that I simply check to see what proportions the original image has compared to the one I want to create. Depending on this I start by shrinking it down along either the x or y axis. I now have an image which is either as high or as wide as the one I want.

 

Next I simply cut the middle part of the image since focus is usually in the center of photos. This seems to work well in most cases for "horizontal" images although not always as well for higher "vertical" ones.

 

Are there any other better methods of doing this?

 

Note: This is not about simply resizing a photo, cropping needs to be done as well, unless the proportions happen to be the same.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.