Remove preview GIFs, keep only portrait-rotated output
All frames and GIFs are 96x128 portrait (rotated 90° CW). Upload directly to panel via app — displays correctly in landscape. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
@ -27,7 +27,7 @@ def ensure_dir(name):
|
||||
|
||||
def save_anim(name, frames, fps=10):
|
||||
d = ensure_dir(name)
|
||||
# Rotate 90° CW so portrait-assuming app displays correctly on landscape panel
|
||||
# Rotate 90° CW: panel app assumes portrait, panel is mounted landscape
|
||||
rotated = [f.rotate(-90, expand=True) for f in frames]
|
||||
for i, f in enumerate(rotated):
|
||||
f.save(os.path.join(d, f"frame_{i+1:03d}.png"))
|
||||
@ -39,16 +39,7 @@ def save_anim(name, frames, fps=10):
|
||||
loop=0,
|
||||
plugin="pillow",
|
||||
)
|
||||
# Also save a landscape preview GIF (un-rotated) for Gitea review
|
||||
preview_path = os.path.join(d, f"{name}_preview.gif")
|
||||
iio.imwrite(
|
||||
preview_path,
|
||||
[f.copy().convert("RGBA") for f in frames],
|
||||
duration=int(1000 / fps),
|
||||
loop=0,
|
||||
plugin="pillow",
|
||||
)
|
||||
print(f" {name}: {len(rotated)} frames ({rotated[0].size}), preview: {preview_path}")
|
||||
print(f" {name}: {len(rotated)} frames ({rotated[0].size})")
|
||||
|
||||
|
||||
# ── TURN SIGNALS ──────────────────────────────────────────────
|
||||
|
||||