Update Fall and First Disciples card artifacts

This commit is contained in:
2026-09-26 11:01:26 -07:00
parent 846b74e13d
commit bd751afe7b
146 changed files with 1268 additions and 464 deletions

View File

@@ -0,0 +1,21 @@
"""Reproduce v06 master from preserved v04 and aligned patches; no generation."""
from pathlib import Path
import hashlib,json
import numpy as np
from PIL import Image
p=Path(__file__).resolve().parent
records=json.loads((p/'patches.json').read_text())
base=p.parent.parent/'v04/source/art-master.png'
assert hashlib.sha256(base.read_bytes()).hexdigest()==records['baseSHA256']
original=Image.open(base).convert('RGB');out=original.copy()
for patch in records['patches']:
name=patch['name'];mask_path=p/f'{name}-mask.png'
assert hashlib.sha256(mask_path.read_bytes()).hexdigest()==patch['maskSHA256']
mask=Image.open(mask_path).convert('L');layer=original.copy()
layer.paste(Image.open(p/f'{name}-aligned.png').convert('RGB'),patch['box'][:2])
out=Image.composite(layer,out,mask)
mask=np.asarray(Image.open(p/'patch-union-mask.png'))>0
changed=np.any(np.asarray(original)!=np.asarray(out),axis=2)
assert not np.any(changed&~mask)
out.save(p/'art-master.png');out.save(p/'art-native.png')
print('Reproduced localized composite; zero changes outside masks.')