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 » Articles » ASP.NET/Web Applications »

Working with Tiff Image and Resizing Images


Posted Date: 30 Jun 2008    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: DhivyaMember Level: Gold    
Rating: 1 out of 5Points: 5



Many may be working with Tiff images in your application. Normally a Tiff image doesn’t get displayed in any of the Native image controls. So the image should be converted to a .JPG image. The image after conversion will be in huge size. The size of the image can also be controlled to the fit the Page.


loadedFilePath = Server.MapPath("~/path/folderName"); System.Drawing.Image imgctl = null;
imgctl = System.Drawing.Image.FromFile(fullFilePath);
// Resize the Image
imgctl = imgctl.GetThumbnailImage(imgctl.Width / 2, imgctl.Height / 2, null, IntPtr.Zero);
// converting the tiff image to .jpg
loadedFilePath = loadedFilePath + "\\" + fileName + ".jpg";
imgctl.Save(loadedFilePath, ImageFormat.Jpeg);
ImgViewer.ImageUrl = "~/path/folderName/" + fileName + ".jpg";


The image is converted to jpeg form and it is saved locally in a folder.




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.
Next Resource: Rating and labelling your ASP.NET website
Previous Resource: Consuming RSS feeds in asp.net
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use