-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some EPS file not handled correctly #302
Comments
Interesting, thanks. Maybe send a pull request for your Python 3 fix and we'll see what we can do for Python 2 |
If you don't get an answer here please try asking on StackOverflow e.g. http://stackoverflow.com/questions/tagged/python-imaging-library |
I have tested yesterday with the "wand" Py3 wrapper of ImageMagick and it successfully does the job. I think I will be pragmatic and switch to "wand"... |
FIXED issue python-pillow#302: python-pillow#302 EPS file can have binary preview. Header is now also read binary. Also fix for resizing EPS. Resolution is now 2 dimensional and dependend on bbox and size.
Fixed in #619 |
Added Python 3.11.0b3
Hi all,
I try to use Pillow in Py3.3 with EPS file.
First of all, all my test are made with this basic EPS file:
(download and rename the extension to EPS, Github does not allow eps directly and I hack it using Png extension :-p)
Many problems:
And the PSfile implementation of read is:
And "i32" raises TypeError in this case.
I think it is a bad idea to decode as a string here, moreover using latin-1 (at worst ascii). Sometimes EPS files can contain only ascii, but sometimes they contain binary data which will be not compatible with latin-1 conversion.
I have tried to fix converting all "str" to "bytes" (and the parsing is now OK), but I'm not sure this is compatible with Python 2 users...
Moreover, I'm not able to save it... The "length" read here:
is too small, and the loop inside "Ghoscript" function leads to a bad exit code while running "gs".... I don't known the EPS norm and I block at this point...
If someone is curious about correcting the EPS module :-)
The text was updated successfully, but these errors were encountered: