Hi, I have a web2py application that have an upload field in a form; after upload I want to resize uploaded image with PIL:
from PIL import Image
infile = request['_vars'][img_field].file #file object, not file name. PIL accept both.
im = Image.open(infile,mode="r")
Image.open generates "IOError: cannot identify image file" (The image is uploaded correctly). In my pc (Linux, python 2.7, Pillow instead PIL) all in ok. In Pythonanywhere there are both PIL than Pillow, but:
- PIL is no more manteined and I want to use Pillow
- there is no way by code to choose Pillow instead PIL (from PIL ... is used by Pillow too same as PIL)
- the only way to use Pillow if PIL in installed is uninstall PIL but I can't (only root can)
There is a way to uninstall or disable PIL?
A similar problem (solved) there is in 2013 conversation https://www.pythonanywhere.com/forums/topic/582/
Thanks! Fabio