views:

28

answers:

2

I wanna know how photos are managed on websites.

Ex: A user uploads a Photo.. say which is 1024 * 768..

I have differnt size thumb nails on the website.

  1. 60 * 60
  2. 30 * 30
  3. 120 * 90
  4. 240 * 180

Since all the above images are not of the same aspec ratio.

which is the best way to resize and crop images to suit my needs ?

Note: Images will contain food or restaurant images. i am not sure how to crop them not knowing the nature of the of image composition.

+1  A: 

You can't auto-crop algorithmically which is why sites that need a certain aspect ratio ask the person uploading to manually crop the image.

Failing that, you'd need a person on the back-end doing the cropping for them.

Once you have the proper aspect, resizing is trivial.

msw
+1  A: 

you can't know what to crop, unless you're using some blob detection recognition algorithm, and detect what you want to remove, and what i just said is sarcasm, because ... forget about it.

so you're better off using resizing, and that's easy, just choose the ratio closest to the ratio of the image. and to choose between same ratios, depend on the image dimensions/quality

LolaRun