mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Fix EPS import
Fixes EPS import by adding the missing "showpage" Postscript command to the end of the gs call. See: https://bugs.ghostscript.com/show_bug.cgi?id=698272 Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
This commit is contained in:
parent
5238e7ccc8
commit
c07ce878d7
|
@ -129,6 +129,7 @@ def Ghostscript(tile, size, fp, scale=1):
|
||||||
"-c", "%d %d translate" % (-bbox[0], -bbox[1]),
|
"-c", "%d %d translate" % (-bbox[0], -bbox[1]),
|
||||||
# adjust for image origin
|
# adjust for image origin
|
||||||
"-f", infile, # input file
|
"-f", infile, # input file
|
||||||
|
"-c", "showpage", # showpage (see: https://bugs.ghostscript.com/show_bug.cgi?id=698272)
|
||||||
]
|
]
|
||||||
|
|
||||||
if gs_windows_binary is not None:
|
if gs_windows_binary is not None:
|
||||||
|
|
BIN
Tests/images/d15-120f10.eps
Normal file
BIN
Tests/images/d15-120f10.eps
Normal file
Binary file not shown.
|
@ -71,6 +71,10 @@ class TestFileEps(PillowTestCase):
|
||||||
target = Image.open('Tests/images/pil_sample_rgb.jpg')
|
target = Image.open('Tests/images/pil_sample_rgb.jpg')
|
||||||
self.assert_image_similar(cmyk_image, target, 10)
|
self.assert_image_similar(cmyk_image, target, 10)
|
||||||
|
|
||||||
|
def test_showpage(self):
|
||||||
|
plot_image = Image.open("Tests/images/d15-120f10.eps")
|
||||||
|
plot_image.load()
|
||||||
|
|
||||||
def test_file_object(self):
|
def test_file_object(self):
|
||||||
# issue 479
|
# issue 479
|
||||||
image1 = Image.open(file1)
|
image1 = Image.open(file1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user