[Bilka] [2.1.17] libpng warnings: iCCP RGB profile on greyscale PNGs

Bugs which we just recently fixed in our development version and will reach you in the next release.
sparr
Smart Inserter
Smart Inserter
Posts: 1557
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[Bilka] [2.1.17] libpng warnings: iCCP RGB profile on greyscale PNGs

Post by sparr »

Factorio 2.1.17 (build 87315, linux64, steam, space-age)

Loading any map prints libpng warnings to stdout and the log, one per affected sprite — 14 in a minimal session:

Code: Select all

libpng warning: iCCP: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG
Cause: 16 PNGs shipped in data/ are greyscale (PNG colour type 0 or 4) but carry an embedded iCCP chunk whose profile describes an RGB colour space. The PNG spec disallows that combination, so libpng warns and discards the profile. Rendering is unaffected; it is log noise only.

The files:

Code: Select all

core/graphics/fluid-visualization/connection-both-ways.png
core/graphics/fluid-visualization/connection.png
core/graphics/icons/mip/slots-view.png
space-age/graphics/decorative/waves-relief/waves-05.png
space-age/graphics/decorative/waves-relief/waves-08.png
space-age/graphics/entity/plant/boompuff/boompuff-harvest-shadow.png
space-age/graphics/entity/plant/boompuff/boompuff-shadow.png
space-age/graphics/entity/plant/jellystem/jellystem-shadow.png
space-age/graphics/entity/plant/stingfrond/stingfrond-harvest-shadow.png
space-age/graphics/entity/stomper/legs/leg-shin-shadow.png
space-age/graphics/entity/stomper/legs/leg-thigh-shadow.png
space-age/graphics/entity/stomper/stomper-corpse-head-mask.png
space-age/graphics/entity/strafer/legs/leg-shin-shadow.png
space-age/graphics/entity/strafer/legs/leg-thigh-shadow.png
space-age/graphics/terrain/empty-space.png
space-age/graphics/terrain/vulcanus/volcanic-cracks-hot-light.png
Fix: strip the iCCP chunk from these files, e.g. `ect -9 -strip <file>` or `magick <file> -strip <file>`. The profile is being discarded anyway, and stripping is lossless for the pixel data.

Approximately 90% of this post was authored by Claude Opus 5 after I noticed the warning while working on my own mod that triggered the same warning.
Bilka
Factorio Staff
Factorio Staff
Posts: 3885
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [Bilka] [2.1.17] libpng warnings: iCCP RGB profile on greyscale PNGs

Post by Bilka »

The command to strip only the icc profile is magick <file> +profile icc <file>. Thanks for the report, fixed for 2.1.20.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved for the next release”