mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-11-02 20:33:42 +00:00
Update build.py
生成 32px 的网页图标。
This commit is contained in:
@@ -221,7 +221,7 @@ def write_app_icons(dist, logo):
|
||||
mark = mark.crop(mark.getchannel('A').getbbox())
|
||||
icons = dist / 'icons'
|
||||
icons.mkdir(exist_ok=True)
|
||||
for name, size, scale, background in [('icon-180.png', 180, .84, '#ffffff'), ('icon-192.png', 192, 1, None),
|
||||
for name, size, scale, background in [('favicon-32.png', 32, 1, None), ('icon-180.png', 180, .84, '#ffffff'), ('icon-192.png', 192, 1, None),
|
||||
('icon-512.png', 512, 1, None), ('maskable-512.png', 512, .76, '#ffffff')]:
|
||||
canvas = Image.new('RGBA', (size, size), background or (0, 0, 0, 0))
|
||||
side = round(size * scale)
|
||||
|
||||
Reference in New Issue
Block a user