Jump to content

multiple transparent PNG files throws OutOfMemoryException


JosP

Recommended Posts

Hi,

I've tested Paint.NET with loading several PNG files as layers on top of each other. The PNG's are partially transparent and together form a geographical map.

Doing this I get the message that there isn't enough memory to complete the operation. But it's less than 3 Mb of data and no more than 3 or 4 files.

I suspect an OutOfMemoryException is thrown from somewhere in System.Windows.Drawing namespace.

Yes, I'm developing an PNG-viewer application using the same technology as Paint.NET and get the same error :-(. So I thought to check and see if Paint.NET could handle this operation and maybe I was doing something wrong. But apparently you are facing the same problem?

Regards,

JosP

Link to comment
Share on other sites

Did you read the thread that's sticky'd to this forum about out-of-memory problems?

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

I have now, but the files I'm loading are really quite small and their is about 2GB of free RAM on my system.

I'm not sure I'm loading the PNG's in the proper way though. I first open the bottom one, and then use the import from file menu option from the Layers menu. Is that the way to do it? This is the point where I get the error "Not enough memory to load the image".

Link to comment
Share on other sites

The size on disk does not match the memory usage. It doesn't matter if it's "3mb", or if you have 2GB or 8GB or 1GB or zero. What matters are the pixel dimensions and availability of virtual address space. The amount of physical memory is actually almost irrelevant.

It is not lying to you!

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

I have now, but the files I'm loading are really quite small and their is about 2GB of free RAM on my system.

I'm not sure I'm loading the PNG's in the proper way though. I first open the bottom one, and then use the import from file menu option from the Layers menu. Is that the way to do it? This is the point where I get the error "Not enough memory to load the image".

If that's your answer, you obviously haven't. Read it again. What is your image's pixel size?

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Well, there's your problem. 7Kx7K is huge.

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...