Jump to content
Brad Brighton

[By Design] PNG pixel count restriction on export?

Recommended Posts

I feel a bit silly bringing this one up since you guys are the experts,...

I'm trying to export a recent panorama with 1.6.11 and get this error (screenshot attached) due to the pixel count on the major axis being > 32767. (I checked with the beta version 1.7.0.112 as well; the warning message is still there but it *is* readable vs the 1.6.x version.) I've never run into this before so I wanted to learn more -- and everything I can find about the dimensions spec says width and height in the PNG format are each 4 bytes, not 2. NOTE I'm clear that I'm not talking about bit-depth per pixel; this is about the overall pixel dimensions of the exported image.

I assume I'm missing (or misunderstanding) something somewhere. Would you be kind enough to set me straight (hopefully with references) or if somehow I have it right, please file a bug?

Screen Shot 2019-03-24 at 8.17.58 PM.png


https://bmb.photos Focus: The unexpected, the abstract, the extreme, including paper outputTools: macOS (Primary: Mojave, MBP2018), Canon (Primary: 5D3), iPhone (Primary: X), Epson

Share this post


Link to post
Share on other sites
2 minutes ago, v_kyr said:

Many thanks for the link, v_kyr. My pre-post search didn't find that.

Ugh -- my PNG workflow (macOS) hamstrung by outdated Windows APIs? Gotta love it...


https://bmb.photos Focus: The unexpected, the abstract, the extreme, including paper outputTools: macOS (Primary: Mojave, MBP2018), Canon (Primary: 5D3), iPhone (Primary: X), Epson

Share this post


Link to post
Share on other sites
27 minutes ago, Brad Brighton said:

Many thanks for the link, v_kyr. My pre-post search didn't find that.

Ugh -- my PNG workflow (macOS) hamstrung by outdated Windows APIs? Gotta love it...

The .NET framework is the cause for this limit, which only allows for a maximum object size of 2Gb . Windows itself can handle larger PNG files just fine without issues; it's just that Affinity for Windows is built with .NET framework, and "inherits" this limitation.

For example, I can export a 33.000 x 33.000 large image to PNG in PhotoLine. I can open this in IfranView for viewing. ImageMagick works fine too with these images.

Attempting to load a 33.000x33.000 PNG image in Affinity crashes it, probably due to that .NET 2GB heap size limitation.

Anyway, most image editors will put a limit on max canvas size as well: Affinity can handle up to 256000x256000 pixels, while Photoshop goes a bit higher by supporting 300000x300000 pixels. PhotoLine doesn't seem to have a limit, and will happily output a million pixels (which does seem to become problematic for Windows at that point to generate a thumbnail, and Irfanview refuses to open that file).

I've worked with very large images for academic purposes in the past, and Photoshop's max px dimensions were causing us headaches at the time. I am actually a little surprised to discover today that Affinity Photo's dimensions 'only' goes up to a 256000 px size: I would have expected more. But it is of course more than enough for 99.9% of users.

Share this post


Link to post
Share on other sites

Thanks for the additional context, MOB. I've only just now hit this limit so it's annoying but definitely not the end of the world. It is also a bit disgruntling to be constrained by the limitations of a platform I actively avoid whenever possible. What are you going to do though?  ¯\_(ツ)_/¯


https://bmb.photos Focus: The unexpected, the abstract, the extreme, including paper outputTools: macOS (Primary: Mojave, MBP2018), Canon (Primary: 5D3), iPhone (Primary: X), Epson

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

×