diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index 6f22308de..08110abf3 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -129,6 +129,7 @@ def Ghostscript(tile, size, fp, scale=1): "-c", "%d %d translate" % (-bbox[0], -bbox[1]), # adjust for image origin "-f", infile, # input file + "-c", "showpage", # showpage (see: https://bugs.ghostscript.com/show_bug.cgi?id=698272) ] if gs_windows_binary is not None: diff --git a/Tests/images/d15-120f10.eps b/Tests/images/d15-120f10.eps new file mode 100644 index 000000000..ffda2da41 Binary files /dev/null and b/Tests/images/d15-120f10.eps differ diff --git a/Tests/test_file_eps.py b/Tests/test_file_eps.py index ecb34357a..917950aaa 100644 --- a/Tests/test_file_eps.py +++ b/Tests/test_file_eps.py @@ -71,6 +71,10 @@ class TestFileEps(PillowTestCase): target = Image.open('Tests/images/pil_sample_rgb.jpg') 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): # issue 479 image1 = Image.open(file1)