Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#20810 closed Bug (wontfix)

IOError raised when using EPS file in ImageField

Reported by: imatusov Owned by: nobody
Component: File uploads/storage Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When using EPS file in ImageField, I get IOError("decoder eps not availabe") traceback. However, there is support for EPS files in Python:

from PIL import Image'mathematica.eps')

<PIL.EpsImagePlugin.EpsImageFile image mode=RGB size=288x177 at 0x1B01320>

Problem occurs when Django tries to determine the resolution of image. It uses low level API which allows to determine size after loading just couple of chunks. The way EPS support is implemented, API does not triggered it. Attached patch provides a fallback option to use standard Image API.

Attachments (1)

0001-Fix-PIL-bug-when-using-EPS-file-in-ImageField.patch (20.6 KB) - added by imatusov 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by Tim Graham

PIL has been deprecated in Django 1.6 in favor of Pillow. Could you check if this is an issue there?

comment:2 Changed 6 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

comment:3 Changed 6 years ago by Claude Paroz

@timo, could you just explain your "wontfix"? Did someone establish that this was not a problem with Pillow?

comment:4 Changed 6 years ago by Tim Graham

"Won't fix" the issue with PIL & "needs info" as to whether or not it's a problem with Pillow.

Note: See TracTickets for help on using tickets.
Back to Top