mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #5197 from radarhere/getcolors
getcolors() returns colors in the image mode
This commit is contained in:
		
						commit
						e406bd5c84
					
				| 
						 | 
					@ -1243,6 +1243,10 @@ class Image:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        Returns a list of colors used in this image.
 | 
					        Returns a list of colors used in this image.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        The colors will be in the image's mode. For example, an RGB image will
 | 
				
			||||||
 | 
					        return a tuple of (red, green, blue) color values, and a P image will
 | 
				
			||||||
 | 
					        return the index of the color in the palette.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        :param maxcolors: Maximum number of colors.  If this number is
 | 
					        :param maxcolors: Maximum number of colors.  If this number is
 | 
				
			||||||
           exceeded, this method returns None.  The default limit is
 | 
					           exceeded, this method returns None.  The default limit is
 | 
				
			||||||
           256 colors.
 | 
					           256 colors.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user