接口开始5%
This commit is contained in:
@@ -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"]),
|
||||
|
||||
Reference in New Issue
Block a user