"""GPU regression: python3 rgb_target_blend_test.py .""" import pathlib import struct import subprocess import sys import tempfile with tempfile.TemporaryDirectory(prefix="metin2-rgb-blend-") as directory: capture = pathlib.Path(directory) / "destalpha.capture" screenshot = pathlib.Path(directory) / "destalpha.bmp" subprocess.run([sys.argv[1], str(capture)], check=True) subprocess.run([sys.argv[2], "--capture", str(capture), "--frames", "1", "--width", "320", "--height", "240", "--screenshot-out", str(screenshot)], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) data = screenshot.read_bytes() offset = struct.unpack_from("