Out Of Memory exception on System.Drawing.Image.FromFile()

It’s worth knowing that OutOfMemoryException doesn’t always really mean it’s out of memory – particularly not when dealing with files. I believe it can also happen if you run out of handles for some reason.

Are you disposing of all your bitmaps after you’re done with them? Does this happen repeatably for a single image?

Leave a Comment