mirror of
https://github.com/ryanvolz/radioconda.git
synced 2024-11-08 02:16:02 -05:00
Fix setting alpha channel of logo to white for Windows header/welcome
This commit is contained in:
parent
e0396d58ee
commit
3515256306
10
rerender.py
10
rerender.py
@ -27,7 +27,7 @@ def resize_contain(image, size, resample=Image.LANCZOS, bg_color=(255, 255, 255,
|
|||||||
int(math.ceil((size[0] - img.size[0]) / 2)),
|
int(math.ceil((size[0] - img.size[0]) / 2)),
|
||||||
int(math.ceil((size[1] - img.size[1]) / 2)),
|
int(math.ceil((size[1] - img.size[1]) / 2)),
|
||||||
)
|
)
|
||||||
background.paste(img, img_position)
|
background.alpha_composite(img, img_position)
|
||||||
background.format = img_format
|
background.format = img_format
|
||||||
return background.convert("RGBA")
|
return background.convert("RGBA")
|
||||||
|
|
||||||
@ -187,11 +187,11 @@ def render_constructors(
|
|||||||
# convert to RGB (no transparency) and set white background
|
# convert to RGB (no transparency) and set white background
|
||||||
# because constructor eventually converts to bmp without transparency
|
# because constructor eventually converts to bmp without transparency
|
||||||
welcome_image = resize_contain(
|
welcome_image = resize_contain(
|
||||||
logo.convert("RGB"), (164, 314), bg_color=(255, 255, 255, 255)
|
logo, (164, 314), bg_color=(255, 255, 255, 255)
|
||||||
)
|
).convert("RGB")
|
||||||
header_image = resize_contain(
|
header_image = resize_contain(
|
||||||
logo.convert("RGB"), (150, 57), bg_color=(255, 255, 255, 255)
|
logo, (150, 57), bg_color=(255, 255, 255, 255)
|
||||||
)
|
).convert("RGB")
|
||||||
icon_image = resize_contain(logo, (256, 256))
|
icon_image = resize_contain(logo, (256, 256))
|
||||||
|
|
||||||
welcome_image.save(constructor_dir / "welcome.png")
|
welcome_image.save(constructor_dir / "welcome.png")
|
||||||
|
Loading…
Reference in New Issue
Block a user