Strip and lossless

Javi said on 05/29/2018

Hello,

If I use -strip=3 with -lossless it does not strip the EXIF data, is this the expected behaviour?

For example:

test.jpg

cédric (dev) said on 05/30/2018

is this the expected behaviour

it is. the -lossless switch means without *any* loss (see example). it should be used only in some cases — e.g. if you plan to use PNG as heightmap or no auto-rotation for JPG. i suggest you do not use this for Web

Richard said on 06/08/2018

Hi,

First of all - thank you for a great *fast* PNG compressor!

I just noticed that lossless mode does not appear to be truly lossless.

The following image has a single pixel in the top left that has a black color and an alpha value of 6.

gSFXTC9.png

Running it through pingo, even with -lossless, that alpha value is stripped to zero.

This does not happen in all cases. I initially wanted to make a demonstration image using a gradiented alpha, but that did not exhibit the issue. I tried adding some things to the image above, but the issue persisted... so I'm entirely unsure what the conditions are that trigger it.

If you need further information, or if I'm doing it wrong, please do let me know.

Thank you!

cédric (dev) said on 06/09/2018

using last pingo's release, -sN or -lossless should give the same result

gSFXTC9-opt.png

the optimized PNG is paletted with 2 entries: one with alpha to 0 and another which has alpha to 6. this transformation is conform and lossless

Richard said on 06/10/2018

Thank you cédric,

After careful review it looks like your tool may not have been at fault; The GIMP seems not to recognize the two palette entries (or consolidates them to one), but I did verify there are two using other utilities. My apologies for wasting any of your time. I did download 0.97f just in case.

~ Richard

comment this