mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: Image.getcolors
This commit is contained in:
parent
00fef4b5f5
commit
9a0c10e10a
|
@ -1246,7 +1246,7 @@ class Image(object):
|
|||
self.load()
|
||||
if self.mode in ("1", "L", "P"):
|
||||
h = self.im.histogram()
|
||||
out = []
|
||||
out = [] # type: List[Tuple[int, Color]]
|
||||
for i in range(256):
|
||||
if h[i]:
|
||||
out.append((h[i], i))
|
||||
|
|
Loading…
Reference in New Issue
Block a user