Update src/PIL/Image.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Ronald Lencevičius 2020-08-19 08:28:04 -07:00 committed by GitHub
parent 9c0f98aa59
commit 8cce08891c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = []