Libpng warning: ignoring bad adaptive filter type

my application was killed and the warning is log: libpng: Ignoring a bad adaptive filter type. I want to know the reason and solution.

+3
source share
2 answers

The question does not provide enough information to provide a complete answer.

The message "bad adaptive filter" means that the PNG file is either damaged or has been generated by a code encoder.

Each line of a PNG file scan starts with a filter type byte, which should be 0, 1, 2, 3, or 4.

+1
source

, , ( Python):

try:
    Image.open(path).tobytes()
except IOError:
    print('detect error img %s' % path)
    continue
0

All Articles