Support transparent full-canvas HD rounding and rebuild runtimes
Accept strict common-scale integer rounding for complete transparent PNG canvases while retaining source-aware alpha checks and existing opaque/exact cache identities. Add separate cache identity for newly eligible rounded transparent frames and matching Rust/Python regression coverage. Bundle rebuilt Linux and GNU Windows executables against the unchanged reviewed4978 asset pack. Validation: 31 Rust HD tests, 7 Python audit tests, and 341 portable tests passed; zero failures. Original-data integration validated all4978 remasters at scales1–4 with bounded caches. Three fresh software SDL1920x1080 menu/mission captures are pixel-identical to published controls. Windows PE/dependency and complete shared data hashes verified; fresh Wine asset and45-mod validation passed. Artwork geometry remains independently reviewed; no held candidate is admitted by the format change.
This commit is contained in:
1 parent
e6a3d552f5
commit
5956d17785
8 files changed
+404
-25
No files matched your search
@@ -63,15 +63,14 @@ def validate_hd_frame(root, frame, payload, picture):
|
||||
image = image.crop((x, y, x + width, y + height))
|
||||
rounded = image.width * picture.height != image.height * picture.width
|
||||
if rounded and not (
|
||||
source_alpha_min == source_alpha_max == 255
|
||||
and image.size == png_size
|
||||
image.size == png_size
|
||||
and integer_rounded_aspect(image.width, image.height, picture.width, picture.height)
|
||||
):
|
||||
raise ValueError("PNG aspect differs from original canvas; only a full opaque frame may use subpixel integer rounding")
|
||||
raise ValueError("PNG aspect differs from original canvas; only a full frame may use subpixel integer rounding")
|
||||
if image.width < picture.width * 2 or image.height < picture.height * 2:
|
||||
raise ValueError("artwork needs at least twice the logical resolution")
|
||||
alpha_min, alpha_max = image.getchannel("A").getextrema()
|
||||
if rounded and (alpha_min, alpha_max) != (255, 255):
|
||||
if rounded and source_alpha_min != 0 and (alpha_min, alpha_max) != (255, 255):
|
||||
raise ValueError("HD integer-aspect rounding requires a fully opaque source and PNG")
|
||||
if source_alpha_min == 0 and alpha_min != 0:
|
||||
raise ValueError("transparent original needs a transparent HD background")
|
||||
|
||||
Reference in new issue
Block a user