mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-08 21:15:46 +08:00
🎨 为ICON绘制圆环
This commit is contained in:
parent
849f0b4000
commit
5cbc728363
@ -15,6 +15,7 @@ from gsuid_core.utils.image.image_tools import (
|
|||||||
add_footer,
|
add_footer,
|
||||||
get_font_x,
|
get_font_x,
|
||||||
crop_center_img,
|
crop_center_img,
|
||||||
|
draw_pic_with_ring,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .utils import generate_y_ticks
|
from .utils import generate_y_ticks
|
||||||
@ -41,7 +42,10 @@ async def draw_title():
|
|||||||
if _icon_path.exists():
|
if _icon_path.exists():
|
||||||
icon_path = _icon_path
|
icon_path = _icon_path
|
||||||
|
|
||||||
icon = Image.open(icon_path).resize((186, 186)).convert('RGBA')
|
icon = Image.open(icon_path).resize((186, 186))
|
||||||
|
if icon.mode == 'RGB':
|
||||||
|
icon = await draw_pic_with_ring(icon, 186, (189, 72, 37))
|
||||||
|
|
||||||
title.paste(icon, (92, 77), icon)
|
title.paste(icon, (92, 77), icon)
|
||||||
|
|
||||||
MAIN_TITLE: str = status_config.get_config('CustomName').data
|
MAIN_TITLE: str = status_config.get_config('CustomName').data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user