Skip to content

Commit 1bbc527

Browse files
authored
Merge pull request #396 from helgeerbe/Issue394
Force color tuple to contain native Python integer values
2 parents 7757e90 + d8882d3 commit 1bbc527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/picframe/mat_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def __scale_image(self, image, size=None):
305305
def __get_outer_mat_color(self, image):
306306
k = KmeansNp(k=3, max_iterations=10, size=100)
307307
colors = k.run(image)
308-
return tuple(colors[0])
308+
return tuple(colors[0].tolist())
309309

310310
def __get_darker_shade(self, rgb_color, fractional_percent=0.5):
311311
return tuple(map(lambda c: int(c * fractional_percent), rgb_color))

0 commit comments

Comments
 (0)