We are noticing some strange behaviour with willow on jpeg images when calling auto_orient(). It seems to fail on images without colour space metadata or colour profiles. Its hard to replicate if you do not have the correct image (attached below)
To replicate:
Python 3.4.3 (default, Jan 16 2016, 10:01:29)
from willow.image import Image
f = open('IMG_20160602_013511.jpg', 'rb')
img = Image.open(f)
img.auto_orient()
Traceback (most recent call last):
File "", line 1, in
File "/Users/wayne/workspace/cms/venv/lib/python3.4/site-packages/willow/image.py", line 62, in wrapper
return operation(image, _args, *_kwargs)
File "/Users/wayne/workspace/cms/venv/lib/python3.4/site-packages/willow/plugins/pillow.py", line 112, in auto_orient
for transpose in ORIENTATION_TO_TRANSPOSE[orientation]:
KeyError: 0
Hey @kaedroho
We are noticing some strange behaviour with willow on jpeg images when calling auto_orient(). It seems to fail on images without colour space metadata or colour profiles. Its hard to replicate if you do not have the correct image (attached below)
To replicate:
Python 3.4.3 (default, Jan 16 2016, 10:01:29)