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

Post your bugs and problems so we can fix them.
sparr
Smart Inserter
Smart Inserter
Posts: 1523
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[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.
Post Reply

Return to “Bug Reports”