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

2013-06-25 Thread Karsten Wolf

Hi brandon,


the main flaw in eps-pil is it interchanges points and pixels, which  
are very different quantities.


PIL extracts the values from boundingBox (point) and uses them as  
pixel sizes to open the eps file. That's why pil converted eps files  
are at 72 dpi.


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


[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