My PIL library works fine for a while, but now i get this exception everywhere, how to fix this?
f = "/media/bighdd/1.jpg"
from PIL import Image
im = Image.open(f)
im.thumbnail('50x50')
im.save('/media/bighdd/2.jpg')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1437, in save
save_handler(self, fp, filename)
File "/usr/local/lib/python2.7/dist-packages/PIL/JpegImagePlugin.py", line 471, in _save
ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 494, in _save
for e, b, o, a in tile:
ValueError: Not a valid numbers of quantization tables. Should be between 2 and 4.