libpng warning: interlace handling should be turned on when using png_read_image in Python/PyGame

44,108

Solution 1

I had the same problem. It seems to be some bug of older libpng versions (see http://sourceforge.net/p/libpng/bugs/165/ for detail).

It should be already fixed, but not in my current setup: win32 + python 2.7.3.

As a workaround I simply converted png-24 images to png-8 in Photoshop and message has disappeared.

Solution 2

I can confirm that I was having this same issue using Pygame 1.9.6 with Python 3.7.4.

I was able to fix it by downloading Python 3.8 from https://www.python.org/ and installing Pygame 2.0.0.dev6 by doing a quick

python -m pip install Pygame>=2.0.0.dev6

althoug you might be able to get it to work with a version in between the ones I mentioned.

Share:
44,108
Julian Laval
Author by

Julian Laval

Co-founder @ Center Health. When I'm not staring at a 🖥️, I sometimes do things, ✈️, take 🏞️🌉

Updated on July 14, 2022

Comments

  • Julian Laval
    Julian Laval almost 2 years

    I'm using PyGame for Python, and have been receiving the following warning when loading .png images with pygame.image.load:

    libpng warning: Interlace handling should be turned on when using png_read_image
    

    It doesn't affect the program, but has become particularly annoying. I've scoured the web for an answer to no avail.

    I'm currently using 32 bit Python 3.3 with PyGame 1.9.2

    Any ideas as to how I can get the warning to disappear?