Python开源库的bug

scipy

在misc的pilutil.py中def fromimage(im, flatten=0)函数中,

# workaround for crash in PIL, see #1613.
im.convert('L')

上面是之前的代码,当图片模式是二值模式时,此处会出错,因为im.convert('L')对原图片没有任何变化,改为

im = im.convert('L')

原文地址:https://www.cnblogs.com/summerwinter/p/3944191.html