I got an out of memory exception when trying to open a tif file.
But the tif file can be opened from windows imaging.
MSDN mentioned that an out of memory exception will be thrown
"If the file does not have a valid image format or if GDI+ does not support the pixel format of the file"
How I can open such a file with .NET(C#)? Is there anyway to work around?
Thanks a lot for your advice
Do you happen to know the picel format?
Tiff is such a broad spec it virtually impossible for every reader to read
every sort of image that can be stored as a tiff.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Image transition effects, snap-to-grid and Layered Windows are
all discussed in May's edition of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
> I got an out of memory exception when trying to open a tif file.
> But the tif file can be opened from windows imaging.
[quoted text clipped - 5 lines]
>
> Thanks a lot for your advice
Michael - 01 Jun 2004 02:01 GMT
How can I check the pixel format?
I just know it's created by a special scanner.
----- Bob Powell [MVP] wrote: -----
Do you happen to know the picel format?
Tiff is such a broad spec it virtually impossible for every reader to read
every sort of image that can be stored as a tiff.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Image transition effects, snap-to-grid and Layered Windows are
all discussed in May's edition of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
"Michael" <anonymous@discussions.microsoft.com> wrote in message
news:A5A3E8CC-7F4D-4CBA-B5E6-884B18C1C3F7@microsoft.com...
> I got an out of memory exception when trying to open a tif file.
> But the tif file can be opened from windows imaging.
>> MSDN mentioned that an out of memory exception will be thrown
> "If the file does not have a valid image format or if GDI+ does not
support the pixel format of the file"
>> How I can open such a file with .NET(C#)? Is there anyway to work around?
>> Thanks a lot for your advice
Michael - 01 Jun 2004 02:06 GMT
The file format may be JTIF 4:0:0
----- Bob Powell [MVP] wrote: -----
Do you happen to know the picel format?
Tiff is such a broad spec it virtually impossible for every reader to read
every sort of image that can be stored as a tiff.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Image transition effects, snap-to-grid and Layered Windows are
all discussed in May's edition of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
"Michael" <anonymous@discussions.microsoft.com> wrote in message
news:A5A3E8CC-7F4D-4CBA-B5E6-884B18C1C3F7@microsoft.com...
> I got an out of memory exception when trying to open a tif file.
> But the tif file can be opened from windows imaging.
>> MSDN mentioned that an out of memory exception will be thrown
> "If the file does not have a valid image format or if GDI+ does not
support the pixel format of the file"
>> How I can open such a file with .NET(C#)? Is there anyway to work around?
>> Thanks a lot for your advice
Try LEADTOOLS (www.leadtools.com), it can handle a wide variety of Tiff/Jpeg
images, many
that the .NET Framework can't. Also, it keeps the image as 1-BitPerPixel
(for B&W images)
so less memory is required.
> I got an out of memory exception when trying to open a tif file.
> But the tif file can be opened from windows imaging.
[quoted text clipped - 5 lines]
>
> Thanks a lot for your advice