libretro / libretro-thumbnails

Boxarts, titlescreen, and in-game screenshots for the no-intro DATs used by RetroArch
352 stars 350 forks source link

General PNG optimization #348

Open bleuge opened 7 years ago

bleuge commented 7 years ago

Hi, I've been working here optimizing the PNGs for size.

Used Fileoptimizer that runs some png optimizers serially, too slow (weeks of processing). But found some good compromise in terms of final size and compression time. There is a small loss in the image, not visible even with zooming and just relative to quantization (first step is pngquant), other things as re-compression, huffmann optimizations or stripping tags are lossless.

As other user said, pngs with alpha channel must be checked, AFAIK this is not important in boxes, snaps and titles as they are simple scans or snapshots.

If there is interest in this I can show the process i've choosen (pngquant, truepng, defluff,...) and could try to code a python script for processin the whole set.

RobLoach commented 6 years ago

We're now running https://imgbot.net across https://github.com/libretro-thumbnails

This can be closed :+1:

bleuge commented 6 years ago

Wow, interesting, very nice work imgbot, and integrated in github. Any stats about what savings could losslesscompress in imagemagick can achieve? Thanks for this!

RobLoach commented 6 years ago

The reports are on the commits themselves: https://github.com/libretro-thumbnails/Nintendo_-_Game_Boy_Advance/commit/53f96f4a838bde6deee401c91136a38513c9f360

bleuge commented 6 years ago

Thanks!, i've checked some of them, something seems broken:

/NamedSnaps/Spirits Spells (USA).png -- 6.70kb -> 0.00kb (100%) /NamedTitles/Legend of Zelda, The - A Link to the Past Four Swords (Europe) (En,Fr,De,Es,It).png -- 7.54kb -> 0.00kb (100%) /Named_Titles/Kami no Kijutsu - Illusion of the Evil Eyes (Japan).png -- 11.92kb -> 0.00kb (100%) /Named_Snaps/Space Invaders (France).png -- 12.27kb -> 0.00kb (100%) /Named_Snaps/Colin McRae Rally 2.0 (USA) (En,Fr,De).png -- 12.22kb -> 0.00kb (100%) /Named_Snaps/Capcom Classics Mini Mix (USA).png -- 11.04kb -> 0.00kb (100%) /Named_Snaps/Spyro Advance (Japan).png -- 7.83kb -> 0.00kb (100%)

RobLoach commented 6 years ago

Links?

bleuge commented 6 years ago

It's the link you sent me, mate :)

The reports are on the commits themselves: libretro-thumbnails/Nintendo_-_Game_Boy_Advance@53f96f4

RobLoach commented 6 years ago

looks like it doesn't commit the 100% ones: https://github.com/libretro-thumbnails/Nintendo_-_Game_Boy_Advance/blob/master/Named_Titles/Catz%20(USA%2C%20Europe).png