-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
15 lines (13 loc) · 704 Bytes
/
test.py
File metadata and controls
15 lines (13 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from PIL import Image
# img link
img = Image.open(f"./logo.png")
dimensions = [192,512,192,512,60,76,120,152,180,16,32,144,150]
names = ['android-chrome-','android-chrome-','android-chrome-maskable-','android-chrome-maskable-','apple-touch-icon-','apple-touch-icon-','apple-touch-icon-','apple-touch-icon-','apple-touch-icon-','favicon-','favicon-','msapplication-icon-','mstile-']
for i in range(0,13):
newsize = (dimensions[i],dimensions[i])
img_resize = img.resize(newsize)
img_resize.save(f'./icons/{names[i]}{dimensions[i]}x{dimensions[i]}.png')
img = Image.open(f"./logo.png")
newsize = (60,60)
img_resize = img.resize(newsize)
img_resize.save(f'./icons/apple-touch-icon.png')