I can open smaller tifs no problem, but these tifs at 100+MB cannot be opened in Paint.NET. I don't think it's memory issue, because other software can open with no problems (IrfanView, XNViewPortable). Is this a software limitation?

"There was an unspecified error while opening the file."


I'm using Paint.NET v3.5.5 (Final Release build 3.55.3767.28608) on XP SP3.


I think Joel Coehoorn's answer is on the right track. I converted the image to black/white resulting in a file size of just under 5MB. Then attempted to open and received the error again.

Using the original, I tried all sorts of things and eventually figured out that if I reduced the pixels from 6000x6000 to 5000x5000, I could open the image in Paint.NET (even 24bit color).

  • You should send Rick Brewster (the developer of paint.net) a bug report. – akid Oct 28 '10 at 17:37
  • Actually, I found Rick Brewster's explanation: goo.gl/ddV3 It's a known feature (or bug). – Jay Cummins Oct 28 '10 at 17:42

It sounds like you're getting an OutOfMemory exception. The .Net OutOfMemory exception is a bit misleading. It's much more common to see this exception when you run out of address space, which is a little different than physical memory. This means things like checking the task manager to see how much memory is used may not help you track the problem.

Instead, the problem is likely the result of a bug in Paint.Net, such that certain parts of the image are placed by the .Net runtime on something called the Large Object Heap. The file is then loaded in such a way that this same set of memory is created and destroyed several times, perhaps such that it gets a little larger each time. The garbage collector doesn't free up or compact the address space from the Large Object Heap very well (even though the physical memory was released or paged), and so suddenly you get an OutOfMemory exception.

The solution is either for Microsoft to change the behavior of the .Net runtime with respect to the LOH, such that it can go in and compact the LOH in certain situations (perhaps on request, or before throwing the OutOfMemory exception), or for the Paint.Net program to fix the way it loads the file such that it correctly grows whatever existing data structure is causing the problem, rather than recreating it over and over.

  • 1
    I think this message on the Paint.NET forum describes what is happening: goo.gl/ddV3 – Jay Cummins Oct 28 '10 at 17:35
  • @Jay - that's a good way of looking at it. I'm not sure that's exactly your issue, though, as your problem as I understand it is more consistent: you can never load the image, while the link you posted describes a situation where you could load it successfully, but only if it's the first image you open after starting up Paint.Net. – Joel Coehoorn Oct 28 '10 at 17:47

The way a file like this is stored in memory affects how much memory it requires. The other applications might be more memory-efficient.

Given your description, it really sounds like Paint.NET runs out of memory. You could try having the Task Manager open while trying to open the file to see if memory usage grows.

  • Good suggestion. I checked and the memory doesn't change. The error occurs instantly--almost like Paint.NET isn't even trying to open the file. – Jay Cummins Oct 28 '10 at 13:15
  • btw, when i get 15 rep, i'll +1 this answer. – Jay Cummins Oct 28 '10 at 13:16

it may be trying to allocate a contiguous block of memory to read the file, try closing as many apps as possible then retry opening it.

  • I did try that yesterday, but that doesn't seem to be the issue. – Jay Cummins Oct 28 '10 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.