Files
Sanctification/artifacts/cards/BE-002-the-fall/review/make-contact-sheets.py

19 lines
2.5 KiB
Python

from pathlib import Path
from PIL import Image,ImageDraw,ImageFont
import hashlib,json
R=Path('/home/dkzver/docker/sanctification');D=R/'in-progress/cards/BE-042-calling-of-the-first-disciples/revisions/v03';F=R/'in-progress/cards/BE-002-the-fall/revisions/v02'
font=ImageFont.truetype(str(R/'fonts/P052-Bold.otf'),23)
def sheet(items,out):
board=Image.new('RGB',(len(items)*520,770),'#11161c');draw=ImageDraw.Draw(board)
for i,(label,p) in enumerate(items):
im=Image.open(p).convert('RGB');im.thumbnail((500,700));draw.text((i*520+10,10),label,font=font,fill='#f4ead4');board.paste(im,(i*520+10,50))
out.parent.mkdir(parents=True,exist_ok=True);board.save(out)
sheet([('Current Disciples',R/'in-progress/cards/BE-042-calling-of-the-first-disciples/revisions/v02/source/art-master.png'),('Glass construction study',D/'source/disciples-glass/art-native.png')],D/'review/art-comparison.png')
sheet([('Current Fall',R/'artifacts/cards/BE-002-the-fall/source/art-master.png'),('A · Confronting light',F/'source/fall-directional-light/art-native.png'),('B · Eden beyond reach',F/'source/fall-garden-separation/art-native.png')],F/'review/art-comparison.png')
sheet([('Uncommon · glass study',D/'source/disciples-glass/art-native.png'),('Rare · Burning Bush',R/'artifacts/cards/BE-010-burning-bush/source/art-master.png'),('Extraordinary · A',F/'source/fall-directional-light/art-native.png'),('Extraordinary · B',F/'source/fall-garden-separation/art-native.png')],F/'review/rarity-comparison.png')
for root,ids in [(D,['disciples-glass']),(F,['fall-directional-light','fall-garden-separation'])]:
for ident in ids:
p=root/'source'/ident/'art-native.png';im=Image.open(p);meta=json.loads((p.parent/'study.json').read_text());meta.update({'nativeSize':list(im.size),'nativeSHA256':hashlib.sha256(p.read_bytes()).hexdigest(),'fit':'Unfitted native art-only study. Contact sheets uniformly downscale for review; no final master or crop selected.','tool':'built-in image_gen','referenceDelivery':'Conversation images, after filesystem image access failed.'});(p.parent/'study.json').write_text(json.dumps(meta,indent=2)+'\n')
(root/'README.md').write_text('# Provisional art-only studies\n\nCompare the new treatments with the unchanged existing artwork in [art-comparison.png](review/art-comparison.png).\n\nExact prompts and native generated images are under `source/` by study ID. No artwork selection or final assembly has occurred; current accepted and assembled cards remain unchanged.\n')
print('Saved art-only comparisons and native source provenance.')