Page 1 of 1

Preferred PNG optimizer?

PostPosted: 04 Aug 2018, 21:53
by CptKird
Dear cardfloppers and eagle eyes,

been working in prepress for the last 22 years, using Photoshop daily and from time to time I add a new set (mostly old school sets) of descreened scans to my tablet.

For each set, there's a PS actionlist to produce very agreeable descreening results, with perfect transparent corners, from the base XLHQ pics set.

So I save as .png and optimise the output with pinga atm ( https://css-ig.net/pinga ) which works like a charm (output > mark all > send to pinga > optimize. The output will be re-/overwritten). It uses all available cores, so this will sloooow things down on your machine(!) And I don't think it uses dithering, only palette customisation and other tricks, I added an example.
(I didn't destroy every last bit of screening, mind you :) Descreening, for me, has served its purpose as soon as there's no chance for a moiré on my tablet anymore. And as you all know, every descreening routine eats fine detail, so I try to keep slightly more detail. Except for those brutal screenings from the very first sets ;)
Oh, and if you're seeing intransparent corners, that might be due to any kind of factors, it definately works here!)

My question to you is: What are your preferred ways of png optimisation, focusing on best color reproduction (perceptual)?
Size differences of a few kbytes (eg. 315kb or 400kb for the same image) wouldn't make much difference to me.

I tried most of these already: https://css-ig.net/png-tools-overview#overview but might have missed the best settings regarding (perceptual) color accuracy on some.

Ironically, png optimisation via "save for web" using photoshop wasn't "that" bad, but it's a pain to implement with actionlists (at least with CS6 here).

So, hit me with your preferred and proven to be very accurate color reproduction png optimisations, command line tools wouldn't be a problem :)

Thanks in advance!
Cpt. Kird

Norritt.full.jpg
Original XLHQ file


Norritt.full.png
PS output file (PS standard compression, because of 2 mbyte site upload limit. Original PS output = 2,95 mbyte)


Norritt.full_pinga.png
The optimised output of the PS file using pinga (strip level 3, auto-lossy 9, quality max)

Re: Preferred PNG optimizer?

PostPosted: 20 Aug 2018, 08:06
by originaldef
Turn off Strip or Convert to sRGB using PhotoShop for best color reproduction.

Re: Preferred PNG optimizer?

PostPosted: 25 Aug 2018, 19:03
by Dstinct
I'd be interested in hearing more about the process you currently have. I just finished cleaning up a full set of tokens for Trice, and have been downloading the high rez pngs from Scryfall on the fly via the software once I figured out the proper API. The problem is that the pngs are anywhere from 1-2mb each. I'm not a huge stickler for the color as long as it doesn't totally flatten them, but Im more interested in reducing file size. Their pngs also have a tiny bit of white haloing in the corners that I can notice on a dark background.

Re: Preferred PNG optimizer?

PostPosted: 01 Sep 2018, 16:50
by CptKird
Dstinct wrote:I'd be interested in hearing more about the process you currently have. ... I'm not a huge stickler for the color as long as it doesn't totally flatten them, but Im more interested in reducing file size.
Hello,

sorry for the late answer,

well, have you tried the above mentioned compressor with the mentioned settings? It's ridiculously easy :)

I can really recommend this site for png compression tests: https://css-ig.net/
These are some examples of different approaches to png compression: https://css-ig.net/articles/lossy-png-optimization

So far, I haven't encountered a png compressor which masters palette compression, perceptually.
Because palette/color reduction would probably result in smallest possible filesizes.
I believe pinga auto-lossy does this to some extend as well, but more conservatively.

I tried some compressors (those that ran on Windows) before and afaik the best size results were obtained using the cli version of pinga: https://css-ig.net/pingo but according to this: https://css-ig.net/png-tools-overview#overview ECT "9" is still sligthly better, although you might not live to experience the results, judging from its encoding speeds :?

Haven't done any tests yet if there are actual differences in filesize reductions between gui (pinga) and cli (pingo). The cli version allows far more options though.

Dstinct wrote:Their pngs also have a tiny bit of white haloing in the corners that I can notice on a dark background.
This sounds more like an image preparing question?
I only worked with scans so far, so there was some minor optimisation for the borders needed, to reduce randomness and unnecessary color varations to compress there.
My borders are completely rebuild in photoshop. This implies very accurate scan centering, which most of the sets adhere to. I personally accept 1 or 2 lines of original card image to be replaced by the new border, if the centering wasn't perfect. You won't notice that later.

Re-bordering the image will probably get rid of any effect "spills"/artifacts on your originals.

Hope that answered some of your questions :)

All the best!
Cpt. Kird

Re: Preferred PNG optimizer?

PostPosted: 02 Sep 2018, 01:05
by CptKird
Ok, I just did some tests, to make sure:

First off: I overlooked that the previous mentioned "slightly better" (according to a testing suite of 508 different files) "ECT" is a lossless compression tool only(!) It's incapable of achieving compression levels mentionend with the tools down below. Oh, and if you max out the settings, one file took almost 120 minutes to compress... It went from 1.347.343 bytes to 1.245.450 bytes in that time :) (settings used: compression level 9, --allfilters-b, --pal_sort 120, --mt_deflate=8)

Latest pinga (v0.09b):
- uses palette reduction to 256 colors on every(!) quality setting (0-10) on "auto-lossy" (1-max)
- starts using 24bit colors again at quality level 6 on "lossy (strong)" BUT shows strong banding ("24bit" but only 303 colors used), so, needs dithering (slight filesize increase)

I noticed there's been quite some changes between latest pingo (v0.98.6) and the one I used for my first tests (v0.89).. and I like the results of the old one better! :)

I tested ALL options with latest pingo and none came close to old pingo results... :(
1 -pngquality: palettes down to 256 by default, neither visual nor filesize changes between value 1 and 100 (???)
2 -pngpalette: palettes down to 256 by default, WILL reduce colors on lower values, e.g. 60 = 160 colors
3 -pngfilter: leaves 24bit colors by default, different values apply a quantization like blur to high fidelity noise

Options 1 and 2 obviously reduced filesize significantly compared to old pingo results which was 24bit and 198273 colors used :)
Option 3, 30-39 all produced a slightly blurred version of the old pingo results, missing details while being only 10kbyte smaller.
The "quant-filter" blurred the palette/actual colors used down to 192150, still, way more than needed, the original had 124626(!)

Also it seems some of the links on https://css-ig.net aren't working, since http://x128.ho.ua seems to be down atm, which hosts a lot of tools.



BUT: Since I went back to my old tests I have to mention "Color Quantizer", a gui tool, again.
It's mentioned here: https://css-ig.net/articles/lossy-png-optimization (second one, after pngquant)
You can set the palette to any value you like, optimise it for different perceptual goals and it can shrink those files quite nicely as well. :)

Example for Norrit.full.png, Photoshop original, no compression, 24bit + alpha, 124626 colors used, 3.103.494 bytes:

- Old pingo (v0.89), -X3 -s8: 24bit/198273 colors(?), no dithering, 435.243 bytes
- Latest pinga (v0.9b), autolossy max, quality 10, dither, sRGB (if smaller): 8bit/256 colors, dithering, 340.765 bytes
- Latest pingo (v0.98.6), -pngfilter 30, -nodithering: 24bit, 192150 colors(?), no dithering, 425.738 bytes
- Color Quantizer (v0.7.0.4), custom settings see screenshot: 8bit, 192 colors, dithering, 253.422 bytes ("slow" save), 251.966 bytes ("very slow"(!))

(I have added a setting screenshot for Color Quantizer v0.7.4.3 as well, it was still the latest version on august 19th 2018, but I just did some tests in the past, since either it's buggy or I don't understand some of its new features... color space seems to reorder the palette, but why RGB looks "glitchy" compared to YUV is beyond me. Also colors are slightly different compared to the original!)

So, Dstinct, maybe take a look at Color Quantizer if you want (IMO) the best possible filesize reduction while still retain "most" of the originals visuals.

I now seem to have answered my own question.. unless someone points me to another tool, I'll continue using old pingo :)
Or start crunching with Color Quantizer again :D

All the best!
Cpt. Kird

PS: Since the site to get Color Quantizer from is still down at the time I post this, I hope it's ok to attach the mentioned versions of Color Quantizer as well as that older pingo version :)

01_OldPingo.png


02_NewPinga.png


03_NewPingo.png


04_CQuantSlow.png


05_CQuantVerySlow.png


06_CQuant_0704.png


07_CQuant_0743.png

Re: Preferred PNG optimizer?

PostPosted: 06 Sep 2018, 19:51
by CptKird
Hi,

Quick update:

http://x128.ho.ua is back again, latest Color Quantizer is 0.7.4.4 (since April 2018, my mistake): http://x128.ho.ua/color-quantizer.html

And RGB color space is still glitchy :-/

All the best
Cpt. Kird