Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/icon/make_icon.py
172 views
1
#!/usr/bin/env python3
2
from subprocess import run
3
4
for res in (512, 256, 128, 32, 16):
5
run(['sips', '-z', str(res), str(res), 'sage_icon_1024.png',
6
'--out', 'Sage.iconset/icon_%sx%s.png'%(res, res)])
7
run(['sips', '-z', str(2*res), str(2*res), 'sage_icon_1024.png',
8
'--out', 'Sage.iconset/icon_%sx%[email protected]'%(res, res)])
9
run(['iconutil', '-c', 'icns', 'Sage.iconset'])
10
11
12
13