Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Any one help us ,As i need c# code for how to load tif file in image control
Posted

http://www.codeproject.com/Articles/9068/A-simple-TIFF-management-class

have a look at this, it may help you.
 
Share this answer
 
You can try by making a method to Convert tiff file to Image control
public Image ConvertTiff(string tifFilePath)
{
Image img = null;
Stream imageStreamSource = new FileStream(tifFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
    TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource,     BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);

    foreach(BitmapSource bmpS in decoder.Frames)
    {
       img = new Image();
       img.Source = bmpS;
       img.Stretch = Stretch.None;
       img.Margin = new Thickness(10);
      
    }
return img;
}

Now You can set your image to picturebox
pictureBox1.Image =ConvertTiff(tifFilePath) ;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900