minetest-mods / technic

Technic mod for Minetest
Other
145 stars 155 forks source link

Optimize PNG images losslessly #501

Closed Calinou closed 5 years ago

Calinou commented 5 years ago

Commands used:

This incorporates non-interlacted PNGs from #500 to fix warnings thrown by libpng.

SmallJoker commented 5 years ago

In fact I now get flooded with new warnings:

2019-06-18 21:08:27: WARNING[Main]: Irrlicht: PNG warning: bKGD: invalid index
2019-06-18 21:08:27: WARNING[Main]: Irrlicht: PNG warning: bKGD: invalid index
Calinou commented 5 years ago

I fixed almost all warnings by using a Git build of oxipng. However, I still get one of those bKGD warnings (it might be on a texture from a dependency, not sure) and a few interlace warnings:

2019-06-18 23:53:59: WARNING[Main]: Irrlicht: PNG warning: bKGD: invalid index
2019-06-18 23:53:59: WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image
2019-06-18 23:53:59: WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image
2019-06-18 23:53:59: WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image
SmallJoker commented 5 years ago

Those warnings should be solved too. From verbose: (stripped timestamps)

VERBOSE[Main]: Client: Attempting to load image file "technic_chromium_lump.png"
WARNING[Main]: Irrlicht: PNG warning: bKGD: invalid index

VERBOSE[Main]: Client: Attempting to load image file "technic_hydro_turbine_side.png"
WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image

VERBOSE[Main]: Client: Attempting to load image file "technic_hydro_turbine_top.png"
WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image

VERBOSE[Main]: Client: Attempting to load image file "technic_hydro_turbine_top_active.png"
WARNING[Main]: Irrlicht: PNG warning: Interlace handling should be turned on when using png_read_image
Calinou commented 5 years ago

I amended this pull request to use OptiPNG + advpng instead of oxipng. It seems to work without warnings now :slightly_smiling_face: