Page 1 of 1
PNG compression - room to improve?
Posted: Sun Jan 05, 2025 2:47 pm
by rotbus19
Sample file attached, size = 248KB. Compression with different tools, using the same settings as much as possible (e.g. 256 colors):
So,
XnView is 73% bigger than the smallest. All the other tools use
https://github.com/shssoichiro/oxipng.
Could XnView use Oxipng to improve its compression?
Re: PNG compression - room to improve?
Posted: Mon Jan 06, 2025 3:15 am
by XnTriq
There's a
color profile embedded in
displaycomparisonfull.png.
Unlike some other programs (like
PngOptimizer), XnView retains profiles.
IMO it's a bad idea to delete them without asking the user.
Re: PNG compression - room to improve?
Posted: Mon Jan 06, 2025 2:27 pm
by rotbus19
Thanks, I didn't check them all for stripping meta data but I just ran the latest Oxipng with '.\oxipng -o 4 displaycomparisonfull.png', and it reduced the test image to 93KB while retaining meta data / color profile.
So, even worse for XnView - 168KB versus 93KB, like for like.
P.S. Stripping the metadata only shaved off 2KB from the 93KB output.
Re: PNG compression - room to improve?
Posted: Tue Jan 28, 2025 8:07 am
by sx090
oxipng is great, would be a lovely addition to a near perfect image handling tool (XnView that is

).
PNGs are sometimes a pain in the a** - so great to still see development in the encoder space

Re: PNG compression - room to improve?
Posted: Wed Feb 05, 2025 12:47 pm
by Marsu42
sx090 wrote: Tue Jan 28, 2025 8:07 am
oxipng is great, would be a lovely addition to a near perfect image handling tool (XnView that is

).
Concerning compression or optimizing tools - instead of integrating 'em into XnViewMP it might be feasible to add post-scripting capability - i.e. to run any script "cmd.exe yadayada.cmd $filename" or "powershell yadayada.ps1 $filename" with the filename input given by XnViewMP?
Re: PNG compression - room to improve?
Posted: Sun Mar 30, 2025 2:00 pm
by rotbus19
Marsu42 wrote: Wed Feb 05, 2025 12:47 pm
add post-scripting capability - i.e. to run any script "cmd.exe yadayada
If a user wants to do that, they may as well download the latest exe from github and use it independent of XnView.
Plus, only a very small percentage of users are going to run command line stuff. Much better to bake in oxipng, so all users can benefit.