mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Correct PDF palette size when saving
This commit is contained in:
		
							parent
							
								
									da0b826e96
								
							
						
					
					
						commit
						98b73009cc
					
				| 
						 | 
					@ -96,7 +96,7 @@ def _write_image(im, filename, existing_pdf, image_refs):
 | 
				
			||||||
        dict_obj["ColorSpace"] = [
 | 
					        dict_obj["ColorSpace"] = [
 | 
				
			||||||
            PdfParser.PdfName("Indexed"),
 | 
					            PdfParser.PdfName("Indexed"),
 | 
				
			||||||
            PdfParser.PdfName("DeviceRGB"),
 | 
					            PdfParser.PdfName("DeviceRGB"),
 | 
				
			||||||
            255,
 | 
					            len(palette) // 3 - 1,
 | 
				
			||||||
            PdfParser.PdfBinary(palette),
 | 
					            PdfParser.PdfBinary(palette),
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
        procset = "ImageI"  # indexed color
 | 
					        procset = "ImageI"  # indexed color
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user