django-versatileimagefield icon indicating copy to clipboard operation
django-versatileimagefield copied to clipboard

Found a GIF file that causes exception while cropping

Open Alex-Sichkar opened this issue 9 years ago • 0 comments

-order Seems like attached file has incorrect palette or something. Exception raised here: https://github.com/respondcreate/django-versatileimagefield/blob/master/versatileimagefield/versatileimagefield.py#L142

In [62]: palette = im.getpalette()
In [63]: im.putpalette(palette)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-63-46e38e31e923> in <module>()
----> 1 im.putpalette(palette)

/home/vitaliy/.virtualenvs/1.9/local/lib/python2.7/site-packages/PIL/Image.pyc in putpalette(self, data, rawmode)
  1473             if not isinstance(data, bytes):
  1474                 if bytes is str:
-> 1475                     data = "".join(chr(x) for x in data)
  1476                 else:
  1477                     data = bytes(data)

TypeError: 'NoneType' object is not iterable

Alex-Sichkar avatar Oct 21 '16 12:10 Alex-Sichkar