mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-01 00:17:27 +03:00 
			
		
		
		
	Fixed another difference between PIL and Pillow
This commit is contained in:
		
							parent
							
								
									91503cafd3
								
							
						
					
					
						commit
						ee04c7ceea
					
				|  | @ -324,7 +324,7 @@ def _save_netpbm(im, fp, filename): | |||
| # -------------------------------------------------------------------- | ||||
| # GIF utilities | ||||
| 
 | ||||
| def getheader(im, palette, info=None): | ||||
| def getheader(im, palette=None, info=None): | ||||
|     """Return a list of strings representing a GIF header""" | ||||
| 
 | ||||
|     optimize = info and info.get("optimize", 0) | ||||
|  | @ -352,7 +352,7 @@ def getheader(im, palette, info=None): | |||
|     # global palette | ||||
|     if im.mode == "P": | ||||
|         # colour palette | ||||
|         if palette is not None and Image.isBytesType(palette): | ||||
|         if palette is not None and isinstance(palette, bytes): | ||||
|             paletteBytes = palette | ||||
|         else: | ||||
|             paletteBytes =im.im.getpalette("RGB")[:maxcolor*3] | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user