views:

16

answers:

1

I am building a website using asp.net and this website will host users images and will give them options to edit these images by resizing, cropping, watermarking,....

I am thinking of 2 ways to save images and want someone to recommend one or advice me with something different better.

1- The user will upload his images, i will put them in a folder called "original" then the user will edit these image, i will put the edited images in a folder called "edited" also will have another folder called "thumb" will contain thumbnails from these images for previewing on the website.

2- After the user upload his images i will put them in a folder, and i will save the edits he did on these images and i will apply these edits on the fly every time the website request an edited image, for example will send the image by a http handler, like that i will save space on the server.

Now i want to know which approach is better

And how it's done in a website such as flikr, does flikr save the images in different sizes or resize them on request?

+1  A: 

Number 1 sounds like the way to go. Should cause fewer headaches too. Definately keep the original image if space allows. Also, consider that using this approach, if you'd be able to link directly to edited images if you wanted, rather than have a script process every image that gets delivered.

GrandmasterB
and does famous image hosting such as flikr or piccasa or facebook do the same?
Amr ElGarhy
I highly doubt flickr or FB process images on the fly. Thats both memory and processor intensive, and they'd be doing it for no particular reason given that physical storage is far cheaper than processor CPUs. I do know that most of the open-source image gallery software uses the approach of pre-processing image and storing both the before and after version. I know thats what I did in the programs I wrote.
GrandmasterB