Jump to content

OverflowException while opening a 35000 x 21500 JPG file (w10x64)


Recommended Posts

the file is a picture of Crystal Peaks location from hallownest.net/downloads/ , the file itself is at mega.nz/#!lgRTnaZZ!_MjsKgWFeta_MUxiXB92BdNM86rsZFjF16l0iryQfNA

 

The error is as follows:

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.JpegFileType.OnLoad(Stream input) in D:\src\pdn\src\PaintDotNet\Data\JpegFileType.cs:line 78

   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

Link to comment
Share on other sites

This is a known issue with the GDI+ library that Paint.NET uses to load JPEG images.

On 1/10/2019 at 1:11 AM, Rick Brewster said:

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.

 

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

9 hours ago, OverflowError said:

Application version: paint.net 4.1.5

 

Don't forget to install updates. 4.1.6 is the latest.

 

Also, 4.1.7 should address this. I'm rewriting many of the file types to use WIC instead of GDI+.

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 just confirmed 4.1.7 works with this image.

 

However, performance is still not good -- I know why/where, but there's a lot of work to fix it. So don't get yours hopes up that being able to open the image will mean that it's practical to edit it. I may or may not have time to fix the internal data structures that cause this for 4.1.7.

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.

×
×
  • Create New...