[Image-SIG] PIL Bug while converting EPS files to PNG
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG