Smiley32 Posted July 9, 2022 Posted July 9, 2022 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) Quote
Staff stokerg Posted July 11, 2022 Staff Posted July 11, 2022 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. Quote
Pšenda Posted July 11, 2022 Posted July 11, 2022 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. PaulEC 1 Quote 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.
carl123 Posted July 11, 2022 Posted July 11, 2022 38 minutes ago, Pšenda said: But the PNG specification has no limit on image size Explained (in part) here... Pšenda 1 Quote 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.
Pšenda Posted July 11, 2022 Posted July 11, 2022 (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! So it's some kind of weird argument. P.S. APhoto can open a larger PNG file, but when you save (Ctrl+S) it will crop it to 32767x32767px without warning! Edited July 11, 2022 by Pšenda Quote 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 stokerg Posted July 12, 2022 Staff Posted July 12, 2022 Hi everyone in this thread, Please see this post from Alfred and the link they have posted: Hope that clears up what is happening Quote
Alfred Posted July 12, 2022 Posted July 12, 2022 2 hours ago, stokerg said: Please see this post from Alfred and the link they have posted: My pronouns: he/him/his emmrecs01, David in Яuislip and jmwellborn 3 Quote Alfred Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)
Smiley32 Posted July 13, 2022 Author Posted July 13, 2022 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. Quote
Smiley32 Posted July 13, 2022 Author Posted July 13, 2022 Sorry about the double message, but I found some more information: The size limit for the export with the GDI isn't documented and may depend on the windows version, see here: https://rdrr.io/r/grDevices/windows/png.html But you may note that JPG and TIFF export with affinity doesn't have this limit (JPG is only limited by their file format) Quote
max1josef Posted February 19, 2024 Posted February 19, 2024 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? Quote
Pšenda Posted February 19, 2024 Posted February 19, 2024 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. max1josef 1 Quote 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.
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.
Note: Your post will require moderator approval before it will be visible.