C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Working with Tiff Image and Resizing Images


Posted Date: 30 Jun 2008    Resource Type: Articles    Category: Web Applications

Posted By: Dhivya       Member Level: Silver
Rating:     Points: 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  
(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: Working with datalist control
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design   Scripts

online optimum rewards

Contact Us    Privacy Policy    Terms Of Use