Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / June 2004

Tip: Looking for answers? Try searching our database.

Open image : Out of memory exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 31 May 2004 08:56 GMT
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
Bob Powell [MVP] - 31 May 2004 12:20 GMT
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
Bill Broker - 25 Jun 2004 21:41 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.