Jump to content

Recommended Posts

Hi there, is there any plan to introduce more options for compressing PNG image exports?

I've noticed I can add my transparent PNGs created in Affinity to an online image compressor like Optimizilla and it will compress the image considerably, whilst retaining the quality and the alpha transparency.

It uses something called "Indexed RGB" colours to do this, reducing file sizes by between 40% and 60% for most PNGs with alpha transparency.

In Affinity, there is just the option of 16 Bit or 8 Bit (dithered).

When exporting logos for the web, this helps improve Pagespeed Insights scores, in addition to reducing load times.

Link to post
Share on other sites

If you click on More... in the Export dialog you'll get additional options, including one that I think may be what you want:
image.png.89b3ed75cedc0dc8a10661d92210fcf3.png

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites
25 minutes ago, walt.farrell said:

If you click on More... in the Export dialog you'll get additional options, including one that I think may be what you want:
image.png.89b3ed75cedc0dc8a10661d92210fcf3.png

Yes but that is on 8-Bit PNGs, which do not support alpha transparency, just single colour transparency.

The method I'm referring to will allow pixels to have multiple levels of opacity, but it will still reduce the number of colours to save file size.

It's like the best of 8-bit and 16-bit PNGs combined.

Link to post
Share on other sites

PNG-8 (Dithered) is just a Preset name, which gives you a default set of export parameters. You can change them in the More... dialog.

If your document is in the RGB/8 color format, and you enable Transparent Background in Document Setup, then you have alpha transparency, and an RGBA/8 document, where each pixel can have transparency.

By default the PNG-8 Preset will have a Pixel format set to "Use document format", which (I believe) will give you a PNG format export with each pixel having 32-bits of information (R, G, B, and A). Additionally, that preset will specify Palletized, reducing the number of colors based on the pallete you choose.

The only difference, I think, between the PNG preset and the PNG-8 (Dithered) preset is whether Palletization is selected by default. The default settings for PNG-8 reduce the number of colors by palletization, and the defaults for PNG don't. But for each of them, if you've enabled document transparency, each pixel can have transparency set separately in the document and in the exported file.

(This is all "as I understand it". I have not done an exhaustive study of the subject.)

Edit: And from MEB's response below, I apparently do not understand what you want, and what Affinity can do. Sorry.

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites
  • Moderators

Hi Checkmate,
I'm not aware of more changes/improvements here but this is indeed a good suggestion. I wouldn't mind to have it as well. As you noticed, we do not support PNG8 with alpha transparency (as Fireworks did) in Affinity apps. For now the best is keep using external apps/optimizers. Eventually we may end up supporting other (newer) formats which provide a good alternative to PNG's as WebP.

Link to post
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.
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

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.