mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 13:14:27 +03:00
ImageStat: simplify call to Image.histogram(mask)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
bcb2db6a87
commit
8b62538617
|
@ -51,10 +51,7 @@ class Stat:
|
|||
:param mask: An optional mask.
|
||||
"""
|
||||
if isinstance(image_or_list, Image.Image):
|
||||
if mask:
|
||||
self.h = image_or_list.histogram(mask)
|
||||
else:
|
||||
self.h = image_or_list.histogram()
|
||||
self.h = image_or_list.histogram(mask)
|
||||
else:
|
||||
self.h = image_or_list
|
||||
if not isinstance(self.h, list):
|
||||
|
|
Loading…
Reference in New Issue
Block a user