C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Images »

Create ThumbNail image in ASP.Net


Posted Date: 23 Aug 2007    Resource Type: Code Snippets    Category: Images
Author: KamalMember Level: Gold    
Rating: 1 out of 5Points: 15



Creation of thumbnails from image in ASP.Net is very easy task.

Following are Steps to create thumbnails image in ASP.Net :

1)Read the Image using the method Image.FromStream() as,


Dim imInputImage, imThumbNail As Image

imInputImage = System.Drawing.Image.FromStream(imgUpload.PostedFile.InputStream)

here,imgUploadis the id of FileUpload Control.

2)Get the ThumbNail Image using the method GetThumbnailImage.

imThumbNail = imInputImage.GetThumbnailImage(100, 100, Nothing, System.IntPtr.Zero)


We can also specify the format of the Thumbnail image we want to save by,


imThumbNail.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg)


Some of the Formats can be,
Jpeg- System.Drawing.Imaging.ImageFormat.Jpeg
Gif - System.Drawing.Imaging.ImageFormat.Gif
Tiff- System.Drawing.Imaging.ImageFormat.Tiff
Png - System.Drawing.Imaging.ImageFormat.Png



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Previous Resource: ThumbNail Creation in ASP.Net
Return to Discussion Resource Index
Post New Resource
Category: Images


Post resources and earn money!
 



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use