Merge pull request 'docs(link): the Asset Bridge needs no libgdiplus (#39, 2 of 2)' (#418) from docs/asset-bridge-gdiplus-art into main

Reviewed-on: #418
This commit is contained in:
2026-11-26 02:22:56 -06:00
5 changed files with 54 additions and 59 deletions

View File

@@ -838,7 +838,7 @@ its answer decides whether there is anything to do at all:
```json ```json
{ "kind":"assets.sources.ok", "assetsEnabled":true, "treeEnabled":true, { "kind":"assets.sources.ok", "assetsEnabled":true, "treeEnabled":true,
"extractorVersion":3, "families":["body","land","static","tree"], "extractorVersion":3, "families":["body","land","static","tree"],
"hashing":false, "complete":true, "imaging":{"ok":true}, "hashing":false, "complete":true,
"files":[ {"name":"anim.mul","size":194950053,"mtime":1778566017000,"sha256":"2d89…"} ], "files":[ {"name":"anim.mul","size":194950053,"mtime":1778566017000,"sha256":"2d89…"} ],
"more":false, "cut":"end" } "more":false, "cut":"end" }
``` ```
@@ -854,9 +854,10 @@ its answer decides whether there is anything to do at all:
client files are byte-identical. Treat a change in it exactly like a changed hash. client files are byte-identical. Treat a change in it exactly like a changed hash.
- **`families` says what this overlay can serve.** An older overlay answers `["body"]`; asking it - **`families` says what this overlay can serve.** An older overlay answers `["body"]`; asking it
for `static` fails per key, per pass, forever. Read this and say "update your plugin" instead. for `static` fails per key, per pass, forever. Read this and say "update your plugin" instead.
- **`imaging.ok: false` is `NO_IMAGING`** — a Linux shard host with no `libgdiplus` cannot decode a - **There is no `imaging` field, and `NO_IMAGING` is retired (servuo-plugins #39).** Every picture
sprite at all ([`SHARD_PREREQS.md`](SHARD_PREREQS.md)). Names and tree files are unaffected: they family now decodes into ARGB1555 with the shard's own readers and no `System.Drawing`, so a Linux
have no pixels in them. shard serves art whether or not `libgdiplus` is installed ([`SHARD_PREREQS.md`](SHARD_PREREQS.md),
[`v8.md`](v8.md) §4.4). Older overlays may still send `imaging:{ok:…}`; ignore it.
**`GET /assets/manifest?family=body`** lists what exists, with a hash and a size and no pixels — so **`GET /assets/manifest?family=body`** lists what exists, with a hash and a size and no pixels — so
you can diff it against what you hold and fetch only what moved. Rows carry you can diff it against what you hold and fetch only what moved. Rows carry
@@ -1379,7 +1380,7 @@ sidecar defines no audiences. Deciding who may see what is the consuming site's
| 425 | Too Early — a command with this `idempotencyKey` is still in flight (Protocol 6), or the shard's single asset slot is held by another `/assets/*` or `/cliloc` call (Protocol 8). Nothing ran; back off and retry | | 425 | Too Early — a command with this `idempotencyKey` is still in flight (Protocol 6), or the shard's single asset slot is held by another `/assets/*` or `/cliloc` call (Protocol 8). Nothing ran; back off and retry |
| 429 | Too many requests — the shard's per-IP account cap was hit on `POST /accounts/create` | | 429 | Too many requests — the shard's per-IP account cap was hit on `POST /accounts/create` |
| 500 | Internal error (e.g. database) | | 500 | Internal error (e.g. database) |
| 503 | Shard not connected — the query needs the live game and it's down. On the asset plane it also carries `NO_IMAGING`: the host cannot render images at all | | 503 | Shard not connected — the query needs the live game and it's down (the asset plane's `NO_IMAGING` cause is retired as of servuo-plugins #39: art decodes without `libgdiplus`) |
| 504 | Shard connected but didn't reply within 10s | | 504 | Shard connected but didn't reply within 10s |
`503` vs `404`: a `503` is transient (shard restarting — retry), a `404` is a real "doesn't exist." `503` vs `404`: a `503` is transient (shard restarting — retry), a `404` is a real "doesn't exist."

View File

@@ -72,44 +72,27 @@ World: Loading...
--- ---
## Host prerequisite: `libgdiplus` on Linux (Protocol 8) ## Host prerequisite: `libgdiplus` on Linux — **retired (servuo-plugins #39)**
Everything above is a repair to one shard's *scripts*. This one is different in kind: it is a > **No longer a prerequisite.** As of servuo-plugins #39 the Asset Bridge decodes every picture it
requirement on the **host**, it applies to every shard, and only to Linux ones. > serves — the body catalogue (PR 1) and item/land art (PR 2) — into ARGB1555 with its own readers
> (`BridgeMul`, `BridgeArtMul`, `BridgeUop`, `BridgeHue`, `BridgePng`) and **no `System.Drawing`**, so
> a Linux/Mono shard serves art whether or not **libgdiplus** is installed. Installing it is harmless
> but buys nothing. The source gate no longer reports an `imaging` state and the `NO_IMAGING` status
> is retired from the wire, because there is no longer a decode that libgdiplus gates. The section
> below is the original Protocol 8 requirement, kept for history.
The Asset Bridge ([`v8.md`](v8.md) §4.4) has the shard read art out of the operator's own UO client The Asset Bridge ([`v8.md`](v8.md) §4.4) has the shard read art out of the operator's own UO client
files. ServUO targets `net48`, so on Linux it runs under Mono, and Mono's `System.Drawing` is a thin files. ServUO targets `net48`, so on Linux it runs under Mono, and Mono's `System.Drawing` was a thin
layer over **libgdiplus** — which sits in the **decode** path and not merely the encode: layer over **libgdiplus** — which the phase-2 decode path put in the **decode** itself and not merely
`Ultima.Frame` writes ARGB1555 through a `LockBits` pointer. Without that library a Linux shard the encode: `Ultima.Frame`, `Art.LoadStatic` and `LoadLand` write ARGB1555 through a `LockBits`
cannot read a sprite at all. pointer into a 16bpp `Bitmap` libgdiplus 6.1 cannot even create. Until #39 a Linux shard without that
library could not read a sprite at all; #39 replaced those vendored decoders with managed ones and
removed the dependency.
**Windows shard hosts need nothing.** `System.Drawing` ships with .NET Framework. Upstream <https://github.com/mono/libgdiplus> **was archived in March 2025** and is read-only — the
strongest argument for the migration #39 completed. Clilocs and the ServUO tree files never touched a
| Host | Get it with | pixel and were never affected.
|---|---|
| Debian / Ubuntu | `sudo apt-get install libgdiplus` — in Debian since bullseye (6.0.4) and bookworm/trixie (6.1), and in Ubuntu universe |
| Fedora / RHEL | `sudo dnf install libgdiplus` (EPEL or the Mono repository) |
| Docker | `RUN apt-get update && apt-get install -y libgdiplus` in the shard image |
| Alpine, or a distro with no package | Build from source. This is the awkward case, and it is worth avoiding by choosing a Debian-based image |
Upstream is <https://github.com/mono/libgdiplus>. **That repository was archived in March 2025** and
is read-only; distributions still package and patch it, so installing it is a normal supported thing
to do today, but nobody is maintaining it upstream. It is the strongest long-term argument for
eventually moving extraction off `System.Drawing`.
**Its absence is not an error and never a crash.** The shard reports a named status on the source
gate — the first call any import makes — so an operator meets this while setting the shard up rather
than as an empty bestiary weeks later:
```
imaging: { ok: false, code: "NO_IMAGING",
reason: "This shard host cannot render images — Mono's System.Drawing needs
libgdiplus. Install it (apt-get install libgdiplus) and re-run the
import. Cliloc and atlas import are unaffected." }
```
Clilocs and the ServUO tree files are genuinely unaffected: neither touches a pixel. The installer's
`doctor` checks for this alongside its other host checks.
--- ---

View File

@@ -314,16 +314,27 @@ appears in two packages.
### 4.4 Requirement: a Linux shard host needs libgdiplus ### 4.4 Requirement: a Linux shard host needs libgdiplus
> **Superseded by #39 — the GDI+-free migration.** As of #39 PR 1 the **body catalogue is wholly > **Superseded by #39 — the GDI+-free migration, now complete.** As of #39 the **whole Asset Bridge
> GDI+-free**: the legacy `anim*.mul` path decodes through `BridgeMul` + `BridgeHue` into ARGB1555 > is GDI+-free** and needs **no libgdiplus at all**:
> (the same approach as the phase-4 UOP reader, §4.3), so importing creature thumbnails needs no >
> libgdiplus, and the `NO_IMAGING` refusal below no longer gates `assets.manifest`/`assets.fetch` > - **PR 1 — the body catalogue.** The legacy `anim*.mul` path decodes through `BridgeMul` +
> for bodies. Verified bit-exact against the vendored decode on Windows (40,341/40,341 records) and > `BridgeHue` into ARGB1555 (the same approach as the phase-4 UOP reader, §4.3). Verified bit-exact
> run on Ubuntu 24.04 / Mono / libgdiplus 6.1 where the vendored path throws `NotImplemented` and > against the vendored decode on Windows (40,341/40,341 records) and run on Ubuntu 24.04 / Mono /
> the managed path produces all 40,341. PR 2 does the same for item/land art (`BridgeArt`); **until > libgdiplus 6.1 where the vendored path throws `NotImplemented` and the managed path produces all
> it lands, art/land decode still needs libgdiplus**, so the prerequisite and the installer > 40,341.
> `doctor` check below stand for that half. Once both PRs ship the Asset Bridge needs no libgdiplus > - **PR 2 — item and land art.** `BridgeArt` decodes `art.mul` statics and land through a new
> at all. The section below is the original phase-2 requirement, kept for history. > `BridgeArtMul` (mirroring `Art.LoadStatic`/`LoadLand`) and applies hues through `BridgeHue` over
> `hues.mul` + the `tiledata.mul` `PartialHue` flag — no `System.Drawing`, no 16bpp `Bitmap`.
> Verified bit-exact on Windows: **43,433/43,433** served pictures (39,189 statics + 4,244 land) and
> **39,189/39,189** again hued in each item's `PartialHue` mode, 0 mismatched; and run on the same
> Linux/Mono host where the vendored path throws `NotImplemented` and the managed path produces them
> all.
>
> Because no decode goes through libgdiplus any more, the `NO_IMAGING` refusal is **retired from the
> wire**: `assets.sources` no longer carries an `imaging` field and neither picture family gates on
> it. The `libgdiplus` prerequisite and the installer `doctor` check below no longer apply (the
> `doctor` row is being removed in a follow-up). The section below is the original phase-2 requirement,
> kept for history.
**Stated prerequisite, not a soft recommendation.** ServUO targets `net48`, so on Linux it runs under **Stated prerequisite, not a soft recommendation.** ServUO targets `net48`, so on Linux it runs under
Mono, and Mono's `System.Drawing` is a thin layer over **libgdiplus**. §4.2 put `System.Drawing` in Mono, and Mono's `System.Drawing` is a thin layer over **libgdiplus**. §4.2 put `System.Drawing` in

View File

@@ -304,10 +304,11 @@ walk's first action and real art at a later one, which the import now falls back
to (§11.2). Body 820 is one of them, and it is a horse. to (§11.2). Body 820 is one of them, and it is a horse.
**NULL stays a first-class state, and always will be.** An install with no shard **NULL stays a first-class state, and always will be.** An install with no shard
link has never imported one; a Linux shard host without `libgdiplus` cannot link has never imported one; and about half the addressable body range has no art
render a sprite at all (a named `NO_IMAGING` status, not an error); and about in any client file. (A Linux shard host once needed `libgdiplus` to decode a
half the addressable body range has no art in any client file. Pages render sprite at all — a named `NO_IMAGING` status; servuo-plugins #39 retired that, so
without images, which is normal and supported, not degraded. the shard now renders art with no host library.) Pages render without images,
which is normal and supported, not degraded.
### The operator's own artwork still wins ### The operator's own artwork still wins

View File

@@ -38,12 +38,11 @@ three things that used to need a desktop, a converter or a shared filesystem no
### What you must do ### What you must do
1. **On a Linux shard host, install `libgdiplus`** — `sudo apt-get install libgdiplus`, or see 1. **No host library to install.** Protocol 8 originally asked a Linux shard host for `libgdiplus`,
[`../link/SHARD_PREREQS.md`](../link/SHARD_PREREQS.md). ServUO runs under Mono there, and Mono's because the picture decode ran through Mono's `System.Drawing`. As of servuo-plugins #39 the Asset
`System.Drawing` is a thin layer over that library, which sits in the **decode** path: without it Bridge decodes every picture with its own managed readers and no `System.Drawing`, so a Linux
the shard cannot read a single sprite. It is not a crash — the panel reports `NO_IMAGING` with shard serves art whether or not `libgdiplus` is present — there is nothing to install and no
the command to fix it — and names and spawn files are unaffected, because neither touches a `NO_IMAGING` state. See [`../link/SHARD_PREREQS.md`](../link/SHARD_PREREQS.md).
pixel. **Windows shard hosts need nothing.** `installer doctor` checks this for you.
2. **Import once, from Admin → Client Files.** Creature portraits, item pictures and the cliloc 2. **Import once, from Admin → Client Files.** Creature portraits, item pictures and the cliloc
table are all on that page, with the same two buttons: *Update* transfers only what a client table are all on that page, with the same two buttons: *Update* transfers only what a client
patch actually changed, *Re-import everything* fetches the lot. patch actually changed, *Re-import everything* fetches the lot.