mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Merge pull request #2722 from wiredfool/pr_2636
Updated version of #2636
This commit is contained in:
		
						commit
						a795714a8f
					
				| 
						 | 
				
			
			@ -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:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										
											BIN
										
									
								
								Tests/images/reqd_showpage.eps
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Tests/images/reqd_showpage.eps
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								Tests/images/reqd_showpage.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Tests/images/reqd_showpage.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 5.9 KiB  | 
| 
						 | 
				
			
			@ -71,6 +71,16 @@ class TestFileEps(PillowTestCase):
 | 
			
		|||
            target = Image.open('Tests/images/pil_sample_rgb.jpg')
 | 
			
		||||
            self.assert_image_similar(cmyk_image, target, 10)
 | 
			
		||||
 | 
			
		||||
    def test_showpage(self):
 | 
			
		||||
        # See https://github.com/python-pillow/Pillow/issues/2615
 | 
			
		||||
        plot_image = Image.open("Tests/images/reqd_showpage.eps")
 | 
			
		||||
        target = Image.open("Tests/images/reqd_showpage.png")
 | 
			
		||||
 | 
			
		||||
        #should not crash/hang
 | 
			
		||||
        plot_image.load()
 | 
			
		||||
        #  fonts could be slightly different
 | 
			
		||||
        self.assert_image_similar(plot_image, target, 2)
 | 
			
		||||
 | 
			
		||||
    def test_file_object(self):
 | 
			
		||||
        # issue 479
 | 
			
		||||
        image1 = Image.open(file1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user