mirror of
https://github.com/9001/copyparty.git
synced 2026-06-20 21:22:26 -06:00
reduce transparency for nicer looking rasterized thumbnail fallbacks for now
This commit is contained in:
parent
ae7558cf37
commit
7122975404
|
|
@ -48,7 +48,7 @@ class Ico(object):
|
||||||
|
|
||||||
h = int(128.0 * h / w)
|
h = int(128.0 * h / w)
|
||||||
w = 128
|
w = 128
|
||||||
img = Image.new("RGB", (w, h), "#" + c[:6])
|
img = Image.new("RGBA", (w, h), "#" + c[:6] + 'aa')
|
||||||
pb = ImageDraw.Draw(img)
|
pb = ImageDraw.Draw(img)
|
||||||
_, _, tw, th = pb.textbbox((0, 0), ext2, font_size=16)
|
_, _, tw, th = pb.textbbox((0, 0), ext2, font_size=16)
|
||||||
xy = (int((w - tw) / 2), int((h - th) / 2))
|
xy = (int((w - tw) / 2), int((h - th) / 2))
|
||||||
|
|
@ -69,7 +69,7 @@ class Ico(object):
|
||||||
|
|
||||||
h = int(64.0 * h / w)
|
h = int(64.0 * h / w)
|
||||||
w = 64
|
w = 64
|
||||||
img = Image.new("RGB", (w, h), "#" + c[:6])
|
img = Image.new("RGBA", (w, h), "#" + c[:6] + 'aa')
|
||||||
pb = ImageDraw.Draw(img)
|
pb = ImageDraw.Draw(img)
|
||||||
try:
|
try:
|
||||||
_, _, tw, th = pb.textbbox((0, 0), ext)
|
_, _, tw, th = pb.textbbox((0, 0), ext)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue