Jump to content

Recommended Posts

Posted

Greetings,

 

I'm working on quite large files, and I'm not able to export those files in PNG.

For you tu understand, here are the simple steps you can do to reproduce the problem:

- Create a PNG file with another software (Krita, Photoshop, GIMP), of size 1600x70928 (the size is not specific of course, but I tried with that)

- Open the file with Affinity Photo (version 1.10.5.1342)

- Open the export window, PNG tab, and see the warning text telling PNG can't be more than 32767px (see attached screenshot, in french)

- The exported image is resized (I don't want that)

 

What is expected:

- Be able to export PNG file without this 32767px limitation: a lot of others software can do it without problem (tested Krita, Photoshop, GIMP and python PIL)

2022-07-09 11-47-33.png

  • Staff
Posted

Hi @Smiley32and Welcome to the Forums,

On 7/9/2022 at 10:47 AM, Smiley32 said:

- Be able to export PNG file without this 32767px limitation: a lot of others software can do it without problem (tested Krita, Photoshop, GIMP and python PIL)

 

As the error states, PNG is limited to the mentioned size.  Its possible the other apps, don't follow the file specs like Affinity does.  Either way, this isn't a bug and is by design.

Posted
3 hours ago, stokerg said:

the file specs like Affinity does

But the PNG specification has no limit on image size - more precisely, the size is defined as 4B, which is theoretically 4294967296 px.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Posted
38 minutes ago, Pšenda said:

But the PNG specification has no limit on image size

Explained (in part) here...

 

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Posted (edited)
25 minutes ago, carl123 said:

Explain (in part) here...

Yes, I know about the Windows GDI limit - but that's not a limitation of the "PNG spec" as presented here!
By the way, the limit for Windows GDI should prevent any image larger than 32767, i.e. even *.afphoto!
image.png.54b1407af2a97aa6a92dc2a8c8fbb583.png

So it's some kind of weird argument.

 

P.S. APhoto can open a larger PNG file,
image.png.d36a124e0394f33cd0600e0c0a80baa1.png

but when you save (Ctrl+S) it will crop it to 32767x32767px without warning!

Edited by Pšenda

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

  • Staff
Posted

Hi everyone in this thread,

Please see this post from Alfred and the link they have posted: 

 Hope that clears up what is happening :) 

Posted

Hi @stokerg and thanks for your answer.


I saw what you linked, but it doesn't help me at all. First, I can't accept the answer "The best solution is to reduce the DPI/PPI export setting. No one is going to view an image of that size". To give you my example, I work on long image strips, and we read them on specific readers  by scrolling. Its frequent to have a big height, and I absolutely don't want to reduce the quality of the picture!

There may be a GDI limitation (but not for the exporting, unless you use the GDI to export in PNG, but you may easly use something else), but I don't see why Affinity would be unable to bypass this limitation. As others have said, PNG filetype doesn't have such a limitation.

Lastly, the link speaking about a limitation isn't sourced and is 15 years old. Furthermore, it doesn't mention a limit in exporting, but simply a limit for viewing.

 

  • 1 year later...
Posted
On 7/11/2022 at 10:06 AM, stokerg said:

Hi @Smiley32and Welcome to the Forums,

As the error states, PNG is limited to the mentioned size.  Its possible the other apps, don't follow the file specs like Affinity does.  Either way, this isn't a bug and is by design.

I don't see a limitation to 32767 pixels, when I look at the official specs: https://www.w3.org/TR/2003/REC-PNG-20031110/#11IHDR

Quote

11.2.2 IHDR Image header

The four-byte chunk type field contains the decimal values

73 72 68 82

The IHDR chunk shall be the first chunk in the PNG datastream. It contains:

Width 4 bytes
Height 4 bytes
Bit depth 1 byte
Colour type 1 byte
Compression method 1 byte
Filter method 1 byte
Interlace method 1 byte

Width and height give the image dimensions in pixels. They are PNG four-byte unsigned integers. Zero is an invalid value.

If I'm not mistaken, the permissible image dimensions are 4 294 967 296 x 4 294 967 296 pixels (2^32 for a four-byte unsigned integer).

Even with four-byte signed integers, it would be far more than 32767, namely 2 147 483 647 x 2 147 483 647 pixels (2^31-1).

So, where is my mistake in thinking?

Posted
18 minutes ago, max1josef said:

I don't see a limitation to 32767 pixels, when I look at the official specs: https://www.w3.org/TR/2003/REC-PNG-20031110/#11IHDR

If I'm not mistaken, the permissible image dimensions are 4 294 967 296 x 4 294 967 296 pixels (2^32 for a four-byte unsigned integer).

Even with four-byte signed integers, it would be far more than 32767, namely 2 147 483 647 x 2 147 483 647 pixels (2^31-1).

 

On 7/11/2022 at 2:01 PM, Pšenda said:

But the PNG specification has no limit on image size - more precisely, the size is defined as 4B, which is theoretically 4294967296 px.

 

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.