[Image-SIG] PIL Bug while converting EPS files to PNG
Brandon George
brandon.j.george at gmail.com
Fri Dec 7 19:46:03 CET 2012
I wrote a simple implementation of PIL to convert a list of EPS files to
PNG. The output PNG files are at a much lower resolution than required. And
there seems to be no way to fix it.
Looking at /usr/lib64/python2.7/site-packages/PIL/EpsImagePlugin.py this is
implemented by calling ghostscript:
# Build ghostscript command
command = ["gs",
"-q", # quite mode
"-g%dx%d" % size, # set output geometry (pixels)
"-dNOPAUSE -dSAFER", # don't pause between pages, safe mode
"-sDEVICE=ppmraw", # ppm driver
"-sOutputFile=%s" % file,# output file
"- >/dev/null 2>/dev/null"]
the size option only changes the output figure size but does not rescale
it, I can make the output image larger, but not higher resolution because
the EPS file is being imported at a low resolution.
Any help would be appreciated.
Thanks
Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20121207/26d5976e/attachment-0001.html>
More information about the Image-SIG
mailing list