Jump to content

Memory issues with Flatten and Undo


Recommended Posts

I am currently working with a very large (~3000x2000 with about 25 layers) image, which I need to save as multiple PNGs with various layer configurations. Unfortunately, whenever I go to undo after the image flattens, the memory usage increases by about the original image size. After about three flattens and undos, Paint.NET will typically be taking up about 3 GBs worth of memory. It looked like it was fixed with version 3.5.2, but I'm currently using 3.5.6 and I'm having issues.

Link to comment
Share on other sites

Read this:

If this proves to be the problem, you may need to split the image into a couple of smaller work units to make things manageable (think: fewer layers in multiple image files should do it).

Link to comment
Share on other sites

Read this: http://forums.getpai...ead-this-first/

If this proves to be the problem, you may need to split the image into a couple of smaller work units to make things manageable (think: fewer layers in multiple image files should do it).

I looked at it, but the issue is that if I flatten, undo, flatten again, and then undo again, it's trying to store the full image three times.

Link to comment
Share on other sites

If you don't actually need to preserve the session History, this might reduce memory usage build-up.

Go to the PDN file and change it to read-only. (To protect it from accidentally being lost.)

Open the file, make changes, save as PNG with new name. Close file.

Again, open the original PDN file, change, save as differently arranged renamed PNG. Close file.

Repeat as needed.

You never have to unflatten, shouldn't be any memory use build-up,

and is probably as fast as waiting for the unflatten to run.

If you need to save some of the changes as you go,

save as PDN with rename, flatten, save as PNG and close, re-open latest PDN file.

Link to comment
Share on other sites

I'm not seeing a continued leak of memory. I am, however, seeing a leak when you close the image.

I created a 3k x 2k image, and then added 24 layers. I did flatten followed by undo, and repeated several times. Memory usage was parked at almost 700MB, but never great past that except momentarily while undoing.

Then, after closing the image, memory usage stayed about 650mb.

I'll check this out.

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

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.

 Share

×
×
  • Create New...