libpng warning: Ignoring bad adaptive filter type

自古美人都是妖i 提交于 2020-06-11 05:38:05

问题


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


回答1:


The question gives insufficient information to provide a complete answer.

The "bad adaptive filter type" message means that the PNG file is either corrupted or was generated by a buggy encoder.

Each scanline of a PNG file begins with a "filter type" byte which must be 0, 1, 2, 3, or 4.




回答2:


I had this issue before, the image was corrupted by unknown reason, the solution of catching such an error can be using the code below (in Python):

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


来源:https://stackoverflow.com/questions/10134150/libpng-warning-ignoring-bad-adaptive-filter-type

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!