Image Resizing : Part II


In my first article http://www.c-sharpcorner.com/Code/2003/Dec/ImageResizingNFTP.asp  I showed how I resize my digital camera pictures and FTP them to the web. I received a couple of requests to share the code for the image gallery on my web site that I use to view them so here it is.

I wanted to leverage the built-in web controls from asp.net.

Basic Requirements / Functionality

1) Create one image directory on the web site. I named mine pics.

2) Each subfolder will be a gallery.

3) Create a XML file to store the names/locations of the galleries.

4) Use the System.IO directory class to find out what images exist in the galley.

5) Automatically resize the images for thumbnail viewing. (Source code included for resizing component. I utilized the algorithm provided by Robbe D. Morris at http://www.eggheadcafe.com/articles/20030515.asp)

Examples of Use:

My Web Site: http://www.the-dentons.com/PicDirectory.aspx

Brett Ritcheys Site (Master of Copy/Paste): http://www.brettritchey.com/PicDirectory.aspx

NOTE: MAKE SURE TO GIVE THE ASP.NET WRITE ACCESS TO THE ROOT PICTURE FOLDER. Other wise it will not be able to generate the thumbnails.


Similar Articles