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 reco开发者_StackOverflow社区mmend 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?
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.
精彩评论