Runs entirely in your browser. The HTJ2K decoder is
WebAssembly (compiled from the same C++ source as
open_htj2k_dec) — no native binary, no plugin, no
server-side decode. The JPIP server returns raw JPP-stream bytes;
everything you see is assembled and decoded on this page.
Related: pan-and-zoom viewer for gigapixel images.
| Parameter | Default | Values | Effect |
|---|---|---|---|
?server= |
— | host[:port] |
Override the JPIP server URL (same as the Server field in the top bar). |
?reduce= |
1 |
0 · 1 · 2 |
Discard N DWT resolution levels. 0 = full resolution; higher = faster decode, lower detail. |
?para_ratio= |
0.5 |
0.5 · 0.25 · 0.125 |
Parafovea fsiz ratio — the mid-resolution cone's frame size relative to the canvas. |
?peri_ratio= |
0.125 |
0.25 · 0.125 · 0.0625 |
Periphery fsiz ratio — lower values produce a more dramatic outside-the-fovea quality drop. |
?variant= |
auto | mt · st |
Force multi- or single-threaded WASM. Auto picks mt when the page is cross-origin-isolated and SIMD is available. |
Every frame fires three concurrent GETs — one per cone — of the form:
/jpip?fsiz=W,H&roff=X,Y&rsiz=W,H&type=jpp-stream&model=<cache-model>
| Field | Meaning |
|---|---|
fsiz | Target resolution-frame size. The server picks the smallest discard level whose decoded size ≥ fsiz. |
roff | Region offset within the resolution frame. |
rsiz | Region size. Omit roff/rsiz for the whole frame. |
type=jpp-stream | The only wire format this server speaks. |
model | §C.9 client cache-model advertisement — see below. |
After the first frame the demo appends &model=Hm,Ht0,M0 (single-tile image) or &model=Hm,Ht0-N,M0 (N+1 tiles) so the server skips header data-bins the client already has. Precincts are intentionally NOT tracked — the foveation demo resets precinct state per frame so the periphery decays when the gaze moves.
| Class | Prefix | Example |
|---|---|---|
| Main header | Hm | Hm (id is always 0, so no digit) |
| Tile header | Ht | Ht0, Ht1-5 (range compression) |
| Metadata bin | M | M0 |
| Precinct | P | not sent by this demo |