views:

283

answers:

3

Let's say you're creating an eBay-like site where users can list items they wish to sell to others and you want to allow them to upload pictures. In order to make the site look as "clean" as possible, you decide that all image thumbnails will render as 100x100 pixel squares on the main page (the full image could be displayed in another screen if required).

What's the best way to go about doing this? Should you simply resize the image to the specific dimensions and risk warping or crop the image and risk chopping off important parts of the image? Or just thumbnail it with the same aspect ratio and fill in the extra space with some default color?

A: 

You could do both.

You could provide a slider that resizes the image by a particular ratio, and also allow them to move around a clipping region that's the size of the resulting image you want.

Allain Lalonde
+6  A: 

I would say that the option to resize the the image to 100x100 with out regard for the aspect of the original image is and unacceptable solution. In my personal opinion the best option is to give the user a square selection tool, that allows them to drag and move a crop area over their uploaded image. Once they select the crop area you crop the image and resize it to 100x100 pixels. That will give you the cleanest presentation of thumbnail images. Since the image will link to a full size image at it's original aspect I would not worry that some of the image will be lost.

Kelly Anderson
The user selection tool is exactly what I was thinking.
strager
one thing that most sites with this functionality dont do, but is very nice, is to allow the cropping box to exceed the borders of the original image. display a 600x800 image in a 800x800 box with black bars, and include the black bars in the thumbnailable area.
Sparr
@Sparr, Nice suggestion. I'll keep that in mind if I ever have to do something like this.
strager
+1  A: 

Assuming that you need a fallback solution for users who cannot or will not use a graphical cropping tool, I would suggest a list of operations for the user to pick from.

  • letterboxing (show black bars, cut off nothing)
  • crop to center
  • crop to the [NE/NW/SE/SW] corner
  • crop to the middle of the [N/E/S/W] side
Sparr