[Image-SIG] PIL Bug while converting EPS files to PNG

2012-12-21 Thread Brandon George
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
___
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig


[Image-SIG] Changing output resolution when converting EPS file to PNG in Python Imaging Library

2012-10-30 Thread Brandon George
I wrote a simple implementation of PIL to convert a list of EPS files to
PNG images. The problem is the PNG image is of pretty low quality. When I
save the image using im.save(file.png, dpi = (1000, 1000)) the increased
DPI does not result in a higher quality image. I believe this is due to the im
= Image.open(file.eps) importing in low resolution.

Is there a way to import the EPS file into a higher resolution im object?
Thanks in advance. I also have a stackoverflow question about this matter
but haven't received any fixes. It is here
http://stackoverflow.com/questions/12900435/changing-output-resolution-when-converting-eps-file-to-png-in-python-imaging-libin
case you would like to see my script.

Thanks again.

Brandon
___
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig