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

2

11

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?

Nauplius answered 20/10, 2012 at 16:49 Comment(0)
Z
11

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.

Zonate answered 19/12, 2012 at 18:49 Comment(1)
Still not fixed in 2023 to be honest..?Plunkett
S
1

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.

Shortly answered 25/11, 2019 at 11:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.