feat: add spectral fish app icon and branded FCP effect thumbnails for 1.1.1
这个提交包含在:
1 父节点
6899ccf6eb
当前提交
bd02c7a368
13 个文件已更改
+104
-11
没有与搜索条件相匹配的文件
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Export generated brand masters with native macOS image tools."""
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import json
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ICON = ROOT / 'design/dayu-color-app-icon-v1.png'
|
||||
THUMBNAIL = ROOT / 'design/dayu-color-plugin-thumbnail-v1.png'
|
||||
ICNS = ROOT / '大鱼调色/Wrapper Application/Resources/DayuColor.icns'
|
||||
|
||||
|
||||
def run(*args):
|
||||
subprocess.run([str(arg) for arg in args], check=True, stdout=subprocess.DEVNULL)
|
||||
|
||||
|
||||
def sha(path):
|
||||
return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
|
||||
|
||||
def main():
|
||||
ICNS.parent.mkdir(parents=True, exist_ok=True)
|
||||
with tempfile.TemporaryDirectory(prefix='dayu-color-icon-') as temporary:
|
||||
iconset = Path(temporary) / 'DayuColor.iconset'
|
||||
iconset.mkdir()
|
||||
for points in (16, 32, 128, 256, 512):
|
||||
for scale in (1, 2):
|
||||
pixels = points * scale
|
||||
name = f'icon_{points}x{points}' + ('@2x' if scale == 2 else '') + '.png'
|
||||
run('sips', '-z', pixels, pixels, ICON, '--out', iconset / name)
|
||||
run('iconutil', '-c', 'icns', iconset, '-o', ICNS)
|
||||
exports = [{'path': str(ICNS.relative_to(ROOT)), 'sha256': sha(ICNS)}]
|
||||
for name, width, height in [('large.png', 640, 360), ('small.png', 240, 135)]:
|
||||
output = ROOT / 'template' / name
|
||||
run('sips', '-z', height, width, THUMBNAIL, '--out', output)
|
||||
exports.append(dict(path=str(output.relative_to(ROOT)), width=width, height=height, sha256=sha(output)))
|
||||
record = dict(sourceImage='design/dayu-color-plugin-thumbnail-v1.png', sourceImageSHA256=sha(THUMBNAIL),
|
||||
generator='OpenAI built-in image generation', installedPreviewLocked=True, exports=exports)
|
||||
(ROOT / 'template/verification/Preview.json').write_text(json.dumps(record, ensure_ascii=False, indent=2) + '\n')
|
||||
print(json.dumps(record, ensure_ascii=False, indent=2))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
在新工单中引用
屏蔽一个用户