PC Review


Reply
Thread Tools Rate Thread

Breaking multi-page tiffs

 
 
Dano
Guest
Posts: n/a
 
      9th Oct 2008
Hello all, I have searched all over the net, and tried many different things;
but now I am stumped. I am trying to break multipage tiffs into individual
frames and reformatting them to a different compression style.

The application works great on normal tif files, the problem occurs on some
unusual tif images. For instance: the link provided is an 8 page tif file.
The first 5 pages convert just fine, but pages 6 though 8 throw a Generic
GDI+ exception on the SelectActiveFrame method of the image object. Part of
the problem could be that pages 1-5 are 1bit and pages 6-8 are 8 bit.

I threw together some simple code to demonstrate the issue. I would
appreciate any help. If I can get out the individual pages, I can build the
encoders and handle the process of building a new multipage, this code was
simplified to make it easier to get some help.

Thanks, Dan
//using System.Drawing;
//using System.Drawing.Imaging;
//code start
Image inImg;
inImg = Image.FromFile(@"C:\dlbtemp\F32044996.tif");
for (int i = 0; i < inImg.GetFrameCount(FrameDimension.Page); i++)
{
inImg.SelectActiveFrame(FrameDimension.Page, i);
inImg.Save(@"C:\dlbtemp\F32044996_" + i.ToString() + ".tif",
ImageFormat.Tiff);
}
//code end
//example image: http://www.dbpic.com/pub/F32044996.tif
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save a multi-page word document, as a multi-page .pdf file dejavu Microsoft Word Document Management 5 19th May 2008 01:13 PM
Draw text on, split, join, and page count on tiffs Benny Microsoft C# .NET 2 18th Jul 2006 04:21 PM
Breaking up multi-page document into several documents Chuck W Microsoft Word Document Management 2 18th Mar 2005 10:32 PM
GDI+ Error - problem with JPEG compression in Multi-page tiffs =?Utf-8?B?ZnJhbmtlbmJlcnJ5?= Microsoft Dot NET 0 30th Nov 2004 06:49 PM
Multi-alpha tiffs crash explorer file window Ron Windows XP General 0 7th Apr 2004 01:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 PM.