[0.11.22] PNGs are too big, and problematic

This subforum contains all the issues which we already resolved.
Post Reply
FeepingCreature
Inserter
Inserter
Posts: 21
Joined: Sat Dec 13, 2014 1:08 am
Contact:

[0.11.22] PNGs are too big, and problematic

Post by FeepingCreature »

When you start up Factorio on Linux, you may get a bunch of libpng warnings along the lines of "libpng warning: iCCP: known incorrect sRGB profile". From googling, this is because Photoshop actually puts weird invalid sRGB profiles in the PNGs it saves. (source https://wiki.archlinux.org/index.php/Libpng_errors )

So I've tried to use pngcrush ( http://pmt.sourceforge.net/pngcrush/ ) to strip out unneeded chunks and reset the sRGB profile to something innocuous. As a happy side effect, pngcrush also managed to reduce the size of the PNGs distributed with the game from 116MB to 105MB with no loss of quality afaict.

Here's the command I ran from my game folder to crush the PNGs:

Code: Select all

find -name \*.png |xargs -P 5 -I '{}' -exec pngcrush -ow -srgb 0 -rem alla '{}' '{}.tmp.png'
Might be worth it to make something like this part of your release process? Could save a bunch of bandwidth on downloads...

[edit] remove xargs -n 1 as it's redundant with -I

[edit] Just want to add that the devs are aware of it! All is good forever.
Last edited by FeepingCreature on Fri May 22, 2015 8:23 pm, edited 1 time in total.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: PNGs are too big, and problematic

Post by MF- »

Please don't forget to also use the forum search.
https://forums.factorio.com/forum/sea ... GB+profile
Many threads, one specifically about these messages from the devs themselves: https://forums.factorio.com/forum/vie ... =41&t=3944

FeepingCreature
Inserter
Inserter
Posts: 21
Joined: Sat Dec 13, 2014 1:08 am
Contact:

Re: PNGs are too big, and problematic

Post by FeepingCreature »

Oh, good. Thanks.

In that case, devs: please don't forget to fix this for 0.12! :)

User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: PNGs are too big, and problematic

Post by cube »

Yes, we should do that soon :)

I've added -blacken and -reduce to the flags to remove one more MB :-)

Post Reply

Return to “Resolved Problems and Bugs”