Files
servuo-plugins/overlay/Scripts
wtclaude cac66a6b83 fix(bridge): decode item and land art without GDI+ (#39, 2 of 2)
On a Linux/Mono shard the Asset Bridge's item and land art failed: the vendored
Art.LoadStatic/LoadLand build a 16bpp Bitmap (Settings.PixelFormat) and
libgdiplus 6.1 cannot create one, so every static and land picture threw
[GDI+ NotImplemented] before a pixel was read. PR 1 moved the body catalogue off
System.Drawing; this finishes the migration for the art plane, so Windows and
Linux now share one managed path and the whole Asset Bridge needs no libgdiplus.

- BridgeArtMul: a hand-written art.mul static + land decoder to ARGB1555,
  mirroring Art.LoadStatic's run loop and LoadLand's 44x44 diamond, with the
  record/canvas bounds the vendored writers lack (no System.Drawing, no Bitmap).
- BridgeArt: Render now decodes through BridgeArtMul and hues through BridgeHue
  (over hues.mul + the tiledata PartialHue flag) into BridgePng, via a shared
  TryArtPixels helper the parity harness drives. The GDI+ Bitmap/ApplyTo/dispose
  path, the imaging gate, and the Files.CacheData re-check in TryHue are gone,
  because a key now decodes its own fresh buffer that nothing else aliases.
- BridgeAssets: retire BitmapToPng (its last caller) and the imaging probe/field
  machinery; assets.sources no longer carries an imaging field. No decode goes
  through System.Drawing any more, so the NO_IMAGING refusal is retired with the
  GDI+ it guarded. Files.CacheData stays off, now only so the parity oracle's
  vendored decode hands back fresh bitmaps.
- BridgeArtParity: a [BridgeArtParity] GM command / BRIDGE_ART_PARITY=1 boot run
  that compares the managed decode+hue against the vendored one pixel for pixel.

Overlay-only; no wire change beyond the retired imaging field, no PROTOCOL_VERSION
bump. The website tolerates the field's absence (its NO_IMAGING branch is guarded
by `sources.imaging &&`); the dead NO_IMAGING UI/model in module-uo and the
installer doctor libgdiplus row are removed in a tracked follow-up.

Verified on this machine. Windows (vendored GDI+ oracle available): the parity
harness compared every served picture and every one is pixel-identical to the
vendored decode — 43,433/43,433 (39,189 statics + 4,244 land) with no hue, then
39,189/39,189 again hued in each item's PartialHue mode, 0 mismatched. On WSL2
Ubuntu 24.04 / Mono 6.8 / libgdiplus 6.1 (the live-host match) the vendored
oracle threw NotImplemented and the managed path produced all 43,433 + 39,189.
dotnet build 0/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmcaKvWQ8LsnXHKha5y
2026-11-26 02:13:59 -06:00
..