Skip to content Skip to sidebar Skip to footer

Pil (image) Valueerror: Not A Valid Number Of Quantization Tables. Should Be Between 1 And 4

I want to draw a rectangle on a picture and save it as a new file. what I'm doing is below: from PIL import Image from PIL import ImageChops from PIL import ImageDraw im = Image.o

Solution 1:

I worked it out. The problem caused by the Image and PIL libraries I am using.

I uninstalled and removed all previous installed PIL and Image libraries (there were confusion before and difficulties in original installations) so I have cross files and folders for the libraries.

I did the uninstallations through pip, and "Control Panel\All Control Panel Items\Programs and Features" in Windows as well. Also have manually removed the residues folders and files.

Pillow is the one shall be used. I downloaded a MS Windows installer from https://pypi.python.org/pypi/Pillow/2.6.1 and installed it. Run the script and it's working fine.

Post a Comment for "Pil (image) Valueerror: Not A Valid Number Of Quantization Tables. Should Be Between 1 And 4"