Merge pull request #1478 from baumatron/pillow_fix_eps_gs_command

Fix command to invoke ghostscript for eps files.
This commit is contained in:
wiredfool 2015-12-07 14:15:51 +00:00
commit fb17bf3d20
2 changed files with 5 additions and 2 deletions

View File

@ -123,8 +123,8 @@ def Ghostscript(tile, size, fp, scale=1):
"-q", # quiet mode
"-g%dx%d" % size, # set output geometry (pixels)
"-r%fx%f" % res, # set input DPI (dots per inch)
"-dNOPAUSE -dSAFER", # don't pause between pages,
# safe mode
"-dNOPAUSE", # don't pause between pages,
"-dSAFER", # safe mode
"-sDEVICE=ppmraw", # ppm driver
"-sOutputFile=%s" % outfile, # output file
"-c", "%d %d translate" % (-bbox[0], -bbox[1]),

View File

@ -124,15 +124,18 @@ class TestFileEps(PillowTestCase):
# Arrange
image1 = Image.open(file1)
image2 = Image.open(file2)
image3 = Image.open("Tests/images/illu10_preview.eps")
new_size = (100, 100)
# Act
image1 = image1.resize(new_size)
image2 = image2.resize(new_size)
image3 = image3.resize(new_size)
# Assert
self.assertEqual(image1.size, new_size)
self.assertEqual(image2.size, new_size)
self.assertEqual(image3.size, new_size)
def test_thumbnail(self):
# Issue #619