Error : A generic error occurred in GDI+.
HI Everybody
I am facing a problem ... with the .Net GDI class...
now my problem is i have a 003.tif image which include 14 different pages on
it.now i wanted to split those 14 pages in to 14 different images....
In that 14 different pages has got different different compression method
like Group 3 Fax , Group 4 Fax and JPEG etc
bellow is the code to split these images and save it to the hard drive .
Dim imageFile As System.Drawing.Image =
System.Drawing.Image.FromFile("E:\images\003.tif")
Dim frameDimensions As New
System.Drawing.Imaging.FrameDimension(imageFile.FrameDimensionsList(0))
For intFrame As Integer = 0 To
imageFile.GetFrameCount(frameDimensions) - 1
imageFile.SelectActiveFrame(frameDimensions, intFrame)
imageFile.Save("c:\" + intFrame.ToString() + ".tif")
Next
----------------------------------------------
Error Line = imageFile.SelectActiveFrame(frameDimensions, intFrame)
But when it comes to the 7 page it is giving me the error like
Error : A generic error occurred in GDI+.
Ok i know what the problem is : problem is 7 page has got the JPEG
compression ..... but rest of that got Group 3 Fax , Group 4 Fax compression
method.....
I think GDI class not suporting for these type of tif file.cos GDI class
cant go to . SelectActiveFrame( frameDimensions, 7) method...... becos of
the compression.....format....
So i really need to find out a way of spliting these kind of tif image
using vb.Net ..
Any idea on this topic ......
regards
suis
Date:Thu, 9 Aug 2007 01:34:04 -0700
Author:
|