Eric Smith Posted October 1, 2017 Share Posted October 1, 2017 I've been messing around with some very large images lately (size 30,000 x 30,000 and larger) and have noticed a reproducible but on saving - when saving an entire row of pixels will be deleted out of the image. Surest way I've been able to reproduce the bug is to create an image 30,000 wide by 38,000 tall. I've used other dimensions, but this bug is 100% reproducible using these dimensions on my machine. Leaving the entire canvas white Background works fine for this, but it happens regardless of image contents. Duplicate the Background layer for good measure; this brings the total canvas size up to 8.5GB of memory necessary. When you save and close the image then reopen it the entire 2210 row of pixels is blank. You can use the Magic Wand tool to select the background pixels to see the missing row of pixels clearly, for whatever reason the row is gone. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted October 1, 2017 Share Posted October 1, 2017 What format are you saving (.PDN, .PNG, .JPG, etc.)? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Eric Smith Posted October 2, 2017 Author Share Posted October 2, 2017 (edited) I didn't extensively test what formats or how many layers would show this bug, but it is consistently reproducable in .pdn format with more than 1 layer. Edited October 2, 2017 by Eric Smith Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 2, 2017 Share Posted October 2, 2017 If you could come up with a list of steps to reproduce this, that would help a lot Like maybe, create a 40K x 40K image, do these specific things, save it, then re-open it in another tab and see that row #XYZ is just blank for some reason Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 2, 2017 Share Posted October 2, 2017 Also, I may have seen this just last night. I have a Mandelbrot fractal rendering in a 64K x 64K PDN file ... and I think I saw one of the rows was blank for some reason. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Eric Smith Posted October 3, 2017 Author Share Posted October 3, 2017 10 hours ago, Rick Brewster said: If you could come up with a list of steps to reproduce this, that would help a lot Like maybe, create a 40K x 40K image, do these specific things, save it, then re-open it in another tab and see that row #XYZ is just blank for some reason I pretty much listed all the steps in my initial post, but here it is again explicitly described, using the latest release version (4.0.18):1) Create a new image 30,000 px wide by 38,000 px tall. This should automatically create a "Background" layer that is solid white pixels. 2) Duplicate the layer. You can use Magic Wand to select either layer and it should select the entire image on either layer 3) Save file as .pdn 4) Close Paint.net, reopen it, then open the .pdn file 5) Use the Magic Wand tool to select anywhere on either Background layer and a row of pixels will be missing, replaced with transparent pixels, so the Magic Wand will only select part of the image. This has shown up in three different files I was working on with a couple different sizes over 30k px. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 3, 2017 Share Posted October 3, 2017 Yup. That repros very easily for me. Thanks! This is a data loss bug, so I'll be prioritizing it for the next release. 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 3, 2017 Share Posted October 3, 2017 for the 30K x 38K x 2 layer image, the row of pixels that's blank for me is always Y=2210. Same for you? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Eric Smith Posted October 3, 2017 Author Share Posted October 3, 2017 (edited) Yes, y=2210 is the row that blanks for me. I'm not sure if it's always y=2210 - as I said I didn't extensively test this (rendering time just makes it impracticable for me to test for the sake of testing) - but for the 30K x 38K x 2 layer it is always y=2210. In at least one image the blank started part-way through. Attempting to reproduce this on an image 42k x 37700 x 2 layers using the same procedures I used above the missing pixels start at x=30176 y=12134 and continues all the way across that row and into the next row, where a line 3472 px long is missing starting at x=0 y=12135. Edited October 3, 2017 by Eric Smith Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 7, 2017 Share Posted October 7, 2017 Okay I found and fixed the problem. 4.0.20 will have the fix. Both saving and loading had the same bug, which was truncation of a 64-bit value to a 32-bit one at the wrong point in the calculation. This bug has been around ... probably forever. It's not new. 3 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.