#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)
Change History (5)
by , 11 years ago
Attachment: | 0001-Fix-PIL-bug-when-using-EPS-file-in-ImageField.patch added |
---|
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
@timo, could you just explain your "wontfix"? Did someone establish that this was not a problem with Pillow?
comment:4 by , 11 years ago
"Won't fix" the issue with PIL & "needs info" as to whether or not it's a problem with Pillow.
PIL has been deprecated in Django 1.6 in favor of Pillow. Could you check if this is an issue there?