# XcfRegionExtract Extracts the cockpit label cells from the GIMP source art ([`docs/reference/customBackground/riojoy.xcf`](../../docs/reference/customBackground/riojoy.xcf)) into a `regions.json` in `OverlayTemplate` shape — the geometry the Phase 7 overlay generator (`RioJoy.Core.Overlay`) lays text into. Each **named text layer** becomes a region: `Name` = layer name (e.g. `b-00`, `Throttle`), geometry = the layer's box (`PROP_OFFSETS` + width/height), and `FontFamily`/`FontSizePx` from the layer's `gimp-text-layer` parasite. Only layer metadata is read (no tile/pixel data), so XCF tile compression is irrelevant. ## Run ```cmd dotnet run --project tools/XcfRegionExtract ``` Defaults read `docs/reference/customBackground/riojoy.xcf` and overwrite `docs/reference/customBackground/regions.json` (run from the repo root). Override: ```cmd dotnet run --project tools/XcfRegionExtract -- path\to\in.xcf path\to\out.json ``` Re-run whenever the cockpit artwork changes. The committed `regions.json` is the canonical extract; `OverlayTemplate.BaseImagePath` is left null and must point at the exported base cockpit image used as the wallpaper background. > Supports XCF version 0 (`gimp xcf file`) through current; pointers are 64-bit at > version ≥ 11, 32-bit otherwise.