Thursday, March 22, 2012

What is the best way to show an Image

I am trying to do something that is similar to ebay. In other words, a customer can create an account upload some pictures or buy something. Here is my question: when a customer uploads a picture should I save the picture in my web server as it is (the same size)? When a customer goes to the buy page and sees the list of items with sample thumb image for example:

http://antiques.listings.ebay.com/Antiquities-Classical-Amer_Roman_W0QQfromZR4QQsacatZ37907QQsocmdZListingItemList

is the thumb image different from the originally uploaded image or it is the same?

When a customer uploads an image should I create and save two versions of this image: thumb image and the original size image? If yes how?

What I am trying to say is when an image is uploaded should I save the image as it is and when I want to list it I just resize it to small size (using CSS ). If this image is clicked I just bring it up as it is? Or when the image is uploaded I have to reduce it's size to thumb size image and when the customer click on it I somehow increase the size of the clicked image?

thanks

Save the original image and create a thumbnail, so you wind up with 2 files on the server:

1. Save the uploaded image.

2. After you save the original, use ASPJpeg by Persits (most windows hosts already have it installed) to create a thumbnail. Basically you open the original .jpg in code, set the height to a predetermined size, say 90 pixels, and then set the width by a simple algorithm that will keep the height - width ratio in the thumbnail the same as it is in the original image. Then you just save the thumbnail as imagename_tb.jpg.

Creating thumbnails is preferable to resizing since the small image will be much cleaner and easier to see.

0 comments:

Post a Comment