Page 1 of 1

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

Posted: Sun Sep 06, 2026 5:30 pm
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.