Better blur
This commit is contained in:
@@ -73,8 +73,8 @@ class GameCover:
|
|||||||
with Image.open(self.path) as image:
|
with Image.open(self.path) as image:
|
||||||
image = (
|
image = (
|
||||||
image.convert("RGB")
|
image.convert("RGB")
|
||||||
.resize((8, 12))
|
.resize((10, 15))
|
||||||
.filter(ImageFilter.GaussianBlur(3))
|
.filter(ImageFilter.BoxBlur(3))
|
||||||
)
|
)
|
||||||
|
|
||||||
tmp_path = Gio.File.new_tmp(None)[0].get_path()
|
tmp_path = Gio.File.new_tmp(None)[0].get_path()
|
||||||
@@ -84,6 +84,7 @@ class GameCover:
|
|||||||
|
|
||||||
stat = ImageStat.Stat(image.convert("L"))
|
stat = ImageStat.Stat(image.convert("L"))
|
||||||
|
|
||||||
|
# Luminance values for light and dark mode
|
||||||
self.luminance = (
|
self.luminance = (
|
||||||
(stat.mean[0] + stat.extrema[0][0]) / 510,
|
(stat.mean[0] + stat.extrema[0][0]) / 510,
|
||||||
(stat.mean[0] + stat.extrema[0][1]) / 510,
|
(stat.mean[0] + stat.extrema[0][1]) / 510,
|
||||||
|
|||||||
Reference in New Issue
Block a user