Properly Scaled Thumbnails
Generally we were required, in our classic ASP applications, to generate thumbnail images by using a 3rd party COM component. To do the same in the .NET Framework, you need not depend any more on those tools. It has built in functionality which will convert an original image to a thumbnail without ever writing a physical file to the hard disk. Of course, you have the option to save the result if you want. It will allow users to specify the width and height of the thumbnail image using a QueryString. It handles exceptions by throwing an image not found, in case you give a bad filename or invalid parameters. This code can be written within an aspx page, there is no need to use code behind.
Type: Sample Pages
Posted: August 30, 2004
Notes: By default the thumbnail image generated is of type JPEG. One can change the Response.Type by changing the following code.
Response.ContentType = ""image/jpeg""
'Change jpeg word with the required supported format(Gif, Png, Bmp etc).
Code / Download
Disclaimer: If you use any of the source code or compiled applications on this site, you realize that you do so AT YOUR OWN RISK. The items provided here are supplied AS IS and Veign makes no warranty as to its use or performance either expressed or implied.
Veign is a South Carolina Website Design company
Spread the word