reduce transparency for nicer looking rasterized thumbnail fallbacks for now

This commit is contained in:
Til Schmitter 2026-05-08 09:01:58 +02:00
parent ae7558cf37
commit 7122975404

View file

@ -48,7 +48,7 @@ class Ico(object):
h = int(128.0 * h / w)
w = 128
img = Image.new("RGB", (w, h), "#" + c[:6])
img = Image.new("RGBA", (w, h), "#" + c[:6] + 'aa')
pb = ImageDraw.Draw(img)
_, _, tw, th = pb.textbbox((0, 0), ext2, font_size=16)
xy = (int((w - tw) / 2), int((h - th) / 2))
@ -69,7 +69,7 @@ class Ico(object):
h = int(64.0 * h / w)
w = 64
img = Image.new("RGB", (w, h), "#" + c[:6])
img = Image.new("RGBA", (w, h), "#" + c[:6] + 'aa')
pb = ImageDraw.Draw(img)
try:
_, _, tw, th = pb.textbbox((0, 0), ext)