mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-12 16:24:45 +03:00
Update src/PIL/Image.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
9c0f98aa59
commit
8cce08891c
|
@ -1302,10 +1302,8 @@ class Image:
|
|||
return (p1 - p2) ** 2
|
||||
return sum([(p1[i] - p2[i]) ** 2 for i in range(channels)])
|
||||
|
||||
w, h = self.size
|
||||
|
||||
pixels_and_counts = []
|
||||
for count, color in self.getcolors(w * h):
|
||||
for count, color in self.getcolors(self.width * self.height):
|
||||
pixels_and_counts.append((color, count))
|
||||
|
||||
centroids = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user