ARTICLE

Image Resizing : Part II

Posted by wdenton Articles | GDI+ & Graphics January 12, 2004
In my first article Image Resizing and FTP, 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.
Reader Level:
Download Files:
 

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.

Login to add your contents and source code to this article
post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts