hendric

Large file not loading

Recommended Posts

I went through the listed troubleshooting steps, but I still get this error when I try to load a large PNG file.

 

Application version: paint.net 4.1.5

System.OverflowException: Overflow error.
   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
   at PaintDotNet.Data.PngFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\PngFileType.cs:line 114
   at PaintDotNet.FileType.Load(Stream input) in D:\src\pdn\src\Data\FileType.cs:line 496
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in D:\src\pdn\src\Base\Functional\Func.cs:line 158

 

The PNG file is the new large Hubble image of M33.  It is 1.51GB, 32073x41147 on the drive. 

I have 16 GB of system memory and I can create a new canvas of that size and draw on it, so I assume I should be able to load an image of that size?

 

image.thumb.png.91f8ace2f183d9d378ccca7bc965b555.png

 

Possibly the image is corrupt, but I have tried downloading it twice, and Windows was able to generate a thumbnail for it (eventually!).  The half-resolution image is able to load successfully.

 

The image is located at http://hubblesite.org/image/4305/news_release/2019-01

 

Thanks for any help.

 

 

Share this post


Link to post
Share on other sites

Looking at the formula, for paint.net that image uses (32073x41147x4)x(3) = 15.9GB of memory.

In addition to that, paint.net starts breaking down with images that are bigger than 30k pixels wide/high.

It's just too big.

Share this post


Link to post
Share on other sites

Greetings,

 

I don't think the system memory size is the problem as much as processing speed. I have a 6 core processor  with 4 CPUs and 2 GPUs. It took several minutes to save a 32k x 42k image of a white screen. Are you using an i7 or a Ryzen 8 core?

BTW:
It took ~20 minutes to save and created a 1.24 MB PNG  at an 8 bit color depth file.

Edited by HyReZ
inserting additional information

Share this post


Link to post
Share on other sites

It's actually GDI+, which uses WIC, which can't handle an image of that size. I'm not yet clear whether it's a GDI+ limitation or a WIC limitation.

 

I'm able to load a PDN that is 65,535 x 65,535 pixels. However, I can't save that to a PNG because GDI+ (aka System.Drawing) can't handle it.

 

I plan to address this at some point, but right now I'm not sure when that'll happen.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now