用 python 的 PIL 库处理图片,并用 multiprocessing 库做并行计算
运行后报错: IndexError: string index out of range
写了各种函数,debug太烦。 一直以为是代码的问题。
最后发现是因为有几幅图损坏, 导致运行 temp = image.split() 时报错。
加上 try 后就好了
用 python 的 PIL 库处理图片,并用 multiprocessing 库做并行计算
运行后报错: IndexError: string index out of range
写了各种函数,debug太烦。 一直以为是代码的问题。
最后发现是因为有几幅图损坏, 导致运行 temp = image.split() 时报错。
加上 try 后就好了