mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Changed encoderinfo to have priority over info when saving GIF images
This commit is contained in:
		
							parent
							
								
									e24fad40ad
								
							
						
					
					
						commit
						05c78a13e7
					
				|  | @ -305,9 +305,12 @@ class TestFileGif(PillowTestCase): | |||
| 
 | ||||
|         out = self.tempfile('temp.gif') | ||||
|         im = Image.new('L', (100, 100), '#000') | ||||
|         im.save(out, duration=duration) | ||||
|         reread = Image.open(out) | ||||
| 
 | ||||
|         # Check that the argument has priority over the info settings | ||||
|         im.info['duration'] = 100 | ||||
|         im.save(out, duration=duration) | ||||
| 
 | ||||
|         reread = Image.open(out) | ||||
|         self.assertEqual(reread.info['duration'], duration) | ||||
| 
 | ||||
|     def test_multiple_duration(self): | ||||
|  |  | |||
|  | @ -457,7 +457,8 @@ def _save_all(im, fp, filename): | |||
| 
 | ||||
| 
 | ||||
| def _save(im, fp, filename, save_all=False): | ||||
|     im.encoderinfo.update(im.info) | ||||
|     for k, v in im.info.items(): | ||||
|         im.encoderinfo.setdefault(k, v) | ||||
|     # header | ||||
|     try: | ||||
|         palette = im.encoderinfo["palette"] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user