接口开始5%

This commit is contained in:
rain
2026-07-22 17:31:33 +08:00
parent eced3d1e6e
commit 9b0ad62df4
426 changed files with 20111 additions and 28472 deletions
+10 -1
View File
@@ -1,4 +1,4 @@
"""Build exact A01 scroll-skin outputs from chroma-backed visual masters."""
"""从锁定的色键母版确定性生成项目共享卷轴资产。"""
import argparse
import json
@@ -127,7 +127,16 @@ def build_asset(asset: dict, workspace: Path) -> None:
source_path = workspace / asset["source"]
output_path = workspace / asset["output"]
if processing["mode"] != "chroma-stretch":
raise ValueError(f"unsupported scroll processing mode: {processing['mode']}")
with Image.open(source_path) as source:
expected = asset["sourcePixels"]
if source.size != (expected["width"], expected["height"]):
raise ValueError(
f"{asset['id']} source expected {expected['width']}x{expected['height']}, "
f"got {source.width}x{source.height}"
)
cleaned = remove_chroma_background(
source,
parse_hex_color(processing["keyColor"]),