Typing: Image.getcolors

This commit is contained in:
Eric Soroos 2018-01-03 12:11:33 +00:00
parent 00fef4b5f5
commit 9a0c10e10a

View File

@ -1246,7 +1246,7 @@ class Image(object):
self.load() self.load()
if self.mode in ("1", "L", "P"): if self.mode in ("1", "L", "P"):
h = self.im.histogram() h = self.im.histogram()
out = [] out = [] # type: List[Tuple[int, Color]]
for i in range(256): for i in range(256):
if h[i]: if h[i]:
out.append((h[i], i)) out.append((h[i], i))