473,394 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Image.FromFile fails...

pnp
Why does Image.FromFile() fails (OutOfMemoryException) when I try to load an
icon file from the filesystem, that contains 32bit and 24bit icons, but
works fine for Icon files with only 32bit icons (and 8bit icons)?

Does the fact that EnableVisualStyles() is being used matter?

Thanks in advance,
Peter.
Nov 16 '05 #1
1 1797
Hi,

I haven;t had this problem before, the only difference is that the image is
not an Icon, why dont you use the Icon class instead of the Image?

If you need it to convert to an Image for some reason you can use
Icon.ToImage()

Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Why does Image.FromFile() fails (OutOfMemoryException) when I try to load an icon file from the filesystem, that contains 32bit and 24bit icons, but
works fine for Icon files with only 32bit icons (and 8bit icons)?

Does the fact that EnableVisualStyles() is being used matter?

Thanks in advance,
Peter.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
6
by: Jerry West | last post by:
I'm a newbie to .NET from VB6. I have a Form with a Panel control on it. When the Form loads it maximizes and so does the Panel control. I then fill an array with the path to images at a...
14
by: Steve K. | last post by:
I have a method that I use to get a System.Drawing.Image from a file without keeping a handle on the file open (so I can delete the file). Here is the code: <code> public static Image...
1
by: Tim Kelley | last post by:
I need to read the metadata of an image, display it on the screen and allow the user to change it and then re-write the metadata back into the image. The issue I am having is if I try to rename or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.