Opened 11 years ago

Closed 11 years ago

Last modified 11 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

Description

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
Image.open('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 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Tim Graham, 11 years ago

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

comment:2 by Tim Graham, 11 years ago

Resolution: wontfix
Status: newclosed

comment:3 by Claude Paroz, 11 years ago

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

comment:4 by Tim Graham, 11 years ago

"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