L'Ingorgo Sonoro: dal manifesto in piazza, ingrandito e toccato, «Quanto darei per essere all'Ingorgo stasera?!?» e l'effetto speciale; il centro di notte pieno zeppo di gente (sfondi di Codex), le console di Andrea (Suno) che si mescolano camminando, Andrea più grande alla festa, uscendo si torna a maggio. Baldoria al campo sportivo col bandierone della Sampdoria (Codex) (Andrea)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GiECd9Quo9nEdXyjXYF8ma
This commit is contained in:
@@ -36,7 +36,10 @@ def main():
|
||||
p.add_argument('--height', type=int, default=120)
|
||||
p.add_argument('--frames', default=','.join(FRAMES), help='nomi dei fotogrammi, separati da virgola')
|
||||
p.add_argument('--ref', default='stand', help='fotogramma la cui altezza diventa --height')
|
||||
p.add_argument('--fix', default='', help='correzioni di scala per fotogramma, quando nel foglio la figura è disegnata '
|
||||
'più piccola o più grande: wave=1.3,cheer=1.05')
|
||||
a = p.parse_args()
|
||||
fix = {k: float(v) for k, v in (kv.split('=') for kv in a.fix.split(',') if kv)}
|
||||
|
||||
frames = {f: Image.open(Path(a.src) / f'{a.name}_{f}.png').convert('RGBA') for f in a.frames.split(',')}
|
||||
ref = frames[a.ref].getchannel('A').getbbox()
|
||||
@@ -45,10 +48,11 @@ def main():
|
||||
for f, im in frames.items():
|
||||
im = im.crop(im.getchannel('A').getbbox())
|
||||
cx, base = torso_center(im)
|
||||
w, h = max(1, round(im.width * factor)), max(1, round(im.height * factor))
|
||||
k = factor * fix.get(f, 1)
|
||||
w, h = max(1, round(im.width * k)), max(1, round(im.height * k))
|
||||
im = im.resize((w, h), Image.LANCZOS)
|
||||
strip.append(im)
|
||||
meta[f] = {'x': x, 'y': 0, 'w': w, 'h': h, 'ax': round(cx * factor, 1), 'ay': h}
|
||||
meta[f] = {'x': x, 'y': 0, 'w': w, 'h': h, 'ax': round(cx * k, 1), 'ay': h}
|
||||
x += w + 2
|
||||
sheet = Image.new('RGBA', (x, max(im.height for im in strip)), (0, 0, 0, 0))
|
||||
for im, m in zip(strip, meta.values()):
|
||||
|
||||
Reference in New Issue
Block a user