CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    65

    How to Show Multi-page tiff image using c#

    Dear All,

    How to show multi-page tiff image.
    Please give guidance for me..

    Regards,
    Sivakumar.kr

  2. #2
    Join Date
    Dec 2003
    Location
    http://map.search.ch/zuerich.en.html
    Posts
    1,074

    Re: How to Show Multi-page tiff image using c#

    One possibility is to split the TIFF image into multiple images, then you can display them as normal...(this code is untested)
    Code:
    // read in the image
    Image image = Image.FromFile(...);
    
    IList images = new ArrayList();
    
    int count = image.GetFrameCount(FrameDimension.Page);
    for(int idx=0; idx < count; idx++)
    {
    	// save each frame to a bytestream
    	image.SelectActiveFrame(FrameDimension.Page, idx);
    	MemoryStream byteStream = new MemoryStream();
    	image.Save(byteStream, ImageFormat.Bmp); 
    
    	// and then create a new Image from it
    	images.Add(Image.FromStream(byteStream));
    }
    Useful? Then click on (Rate This Post) at the top of this post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured