diff --git a/.gitignore b/.gitignore index f819074..542d4f8 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ build/ # Local agent/sandbox state .claude/ .mcp.json +# Original generated images are large; final processed assets are committed instead +works/*/assets/raw/ diff --git a/src/vnpipe/assets.py b/src/vnpipe/assets.py index 93dcf77..da6d22f 100644 --- a/src/vnpipe/assets.py +++ b/src/vnpipe/assets.py @@ -146,7 +146,7 @@ def process_asset(work_root: Path, asset: dict[str, Any]) -> None: out = trim_and_scale_sprite(chroma_key(img)) else: out = ImageOps.fit(img.convert("RGB"), BG_SIZE, Image.Resampling.LANCZOS) - out.save(final, "PNG", optimize=True) + out.save(final, "WEBP", quality=90, method=6) asset["sha256"] = sha256_file(final) asset["status"] = "processed" @@ -173,7 +173,7 @@ def placeholder(asset: dict[str, Any], label_color: str = "#d8cfc0") -> Image.Im def ensure_placeholder(work_root: Path, asset: dict[str, Any]) -> None: final = work_root / "assets" / asset["file"] final.parent.mkdir(parents=True, exist_ok=True) - placeholder(asset).save(final, "PNG") + placeholder(asset).save(final, "WEBP", quality=90) asset.update(source="placeholder", status="placeholder", sha256=sha256_file(final)) diff --git a/works/faust/assets/assets.json b/works/faust/assets/assets.json index 1b056b8..912e598 100644 --- a/works/faust/assets/assets.json +++ b/works/faust/assets/assets.json @@ -14,7 +14,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "bg/dedication.png", + "file": "bg/dedication.webp", "sha256": null, "status": "planned" }, @@ -26,7 +26,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "bg/theatre.png", + "file": "bg/theatre.webp", "sha256": null, "status": "planned" }, @@ -38,7 +38,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "bg/heaven.png", + "file": "bg/heaven.webp", "sha256": null, "status": "planned" }, @@ -50,7 +50,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "bg/heaven_lord.png", + "file": "bg/heaven_lord.webp", "sha256": null, "status": "planned" }, @@ -62,8 +62,8 @@ "generation_id": "83bd1969-5831-405d-8f27-b1e813e87439", "reference": null, "raw_file": "raw/bg_study.png", - "file": "bg/study.png", - "sha256": "56851eaed4c28d52809ef8dda3912c7b1985b2cbcb4532a027ad124bf672a4d2", + "file": "bg/study.webp", + "sha256": "ea42c3c2407d648496d251efa26c2e7f3007c6471455eb33a7c4cf56e4901d57", "status": "rejected", "notes": "Calibration image: composition good but too photorealistic; base prompt tightened." }, @@ -75,7 +75,7 @@ "generation_id": null, "reference": "bg_study", "raw_file": null, - "file": "bg/study_macrocosm.png", + "file": "bg/study_macrocosm.webp", "sha256": null, "status": "planned" }, @@ -87,7 +87,7 @@ "generation_id": null, "reference": "bg_study", "raw_file": null, - "file": "bg/study_spirit.png", + "file": "bg/study_spirit.webp", "sha256": null, "status": "planned" }, @@ -101,7 +101,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "sprites/faust_neutral.png", + "file": "sprites/faust_neutral.webp", "sha256": null, "status": "planned" }, @@ -115,7 +115,7 @@ "generation_id": null, "reference": "sprite_faust_neutral", "raw_file": null, - "file": "sprites/faust_anguished.png", + "file": "sprites/faust_anguished.webp", "sha256": null, "status": "planned" }, @@ -129,7 +129,7 @@ "generation_id": null, "reference": "sprite_faust_neutral", "raw_file": null, - "file": "sprites/faust_ecstatic.png", + "file": "sprites/faust_ecstatic.webp", "sha256": null, "status": "planned" }, @@ -143,7 +143,7 @@ "generation_id": null, "reference": "sprite_faust_neutral", "raw_file": null, - "file": "sprites/faust_fearful.png", + "file": "sprites/faust_fearful.webp", "sha256": null, "status": "planned" }, @@ -157,7 +157,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "sprites/mephisto_neutral.png", + "file": "sprites/mephisto_neutral.webp", "sha256": null, "status": "planned" }, @@ -171,7 +171,7 @@ "generation_id": null, "reference": "sprite_mephisto_neutral", "raw_file": null, - "file": "sprites/mephisto_sly.png", + "file": "sprites/mephisto_sly.webp", "sha256": null, "status": "planned" }, @@ -185,7 +185,7 @@ "generation_id": null, "reference": "sprite_mephisto_neutral", "raw_file": null, - "file": "sprites/mephisto_scornful.png", + "file": "sprites/mephisto_scornful.webp", "sha256": null, "status": "planned" }, @@ -199,7 +199,7 @@ "generation_id": null, "reference": "sprite_mephisto_neutral", "raw_file": null, - "file": "sprites/mephisto_deferent.png", + "file": "sprites/mephisto_deferent.webp", "sha256": null, "status": "planned" }, @@ -213,7 +213,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "sprites/director_neutral.png", + "file": "sprites/director_neutral.webp", "sha256": null, "status": "planned" }, @@ -227,7 +227,7 @@ "generation_id": null, "reference": "sprite_director_neutral", "raw_file": null, - "file": "sprites/director_pleased.png", + "file": "sprites/director_pleased.webp", "sha256": null, "status": "planned" }, @@ -241,7 +241,7 @@ "generation_id": null, "reference": "sprite_director_neutral", "raw_file": null, - "file": "sprites/director_worried.png", + "file": "sprites/director_worried.webp", "sha256": null, "status": "planned" }, @@ -255,7 +255,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "sprites/poet_neutral.png", + "file": "sprites/poet_neutral.webp", "sha256": null, "status": "planned" }, @@ -269,7 +269,7 @@ "generation_id": null, "reference": "sprite_poet_neutral", "raw_file": null, - "file": "sprites/poet_inspired.png", + "file": "sprites/poet_inspired.webp", "sha256": null, "status": "planned" }, @@ -283,7 +283,7 @@ "generation_id": null, "reference": "sprite_poet_neutral", "raw_file": null, - "file": "sprites/poet_indignant.png", + "file": "sprites/poet_indignant.webp", "sha256": null, "status": "planned" }, @@ -297,7 +297,7 @@ "generation_id": null, "reference": null, "raw_file": null, - "file": "sprites/clown_neutral.png", + "file": "sprites/clown_neutral.webp", "sha256": null, "status": "planned" }, @@ -311,7 +311,7 @@ "generation_id": null, "reference": "sprite_clown_neutral", "raw_file": null, - "file": "sprites/clown_laughing.png", + "file": "sprites/clown_laughing.webp", "sha256": null, "status": "planned" }, @@ -325,7 +325,7 @@ "generation_id": null, "reference": "sprite_clown_neutral", "raw_file": null, - "file": "sprites/clown_mocking.png", + "file": "sprites/clown_mocking.webp", "sha256": null, "status": "planned" } diff --git a/works/faust/assets/bg/study.png b/works/faust/assets/bg/study.png deleted file mode 100644 index 99ed98e..0000000 Binary files a/works/faust/assets/bg/study.png and /dev/null differ diff --git a/works/faust/assets/bg/study.webp b/works/faust/assets/bg/study.webp new file mode 100644 index 0000000..2bc1026 Binary files /dev/null and b/works/faust/assets/bg/study.webp differ diff --git a/works/faust/assets/raw/bg_study.png b/works/faust/assets/raw/bg_study.png deleted file mode 100644 index 5b69f69..0000000 Binary files a/works/faust/assets/raw/bg_study.png and /dev/null differ