Binary layout
The total file length must match the lengths recorded in the header. Unknown major or minor versions, codecs and flags are rejected.
| Byte offset | Size | Field |
|---|---|---|
| 0 | 8 | Magic bytes 4c 49 4d 47 0d 0a 1a 0a |
| 8 | 1 | Major version (major) = 0 |
| 9 | 1 | Minor version (minor) = 1 |
| 10 | 1 | Codec = 1 (PNG) |
| 11 | 1 | Flags = 0 |
| 12 | 4 | UTF-8 JSON length in bytes |
| 16 | 4 | PNG payload length in bytes |
| 20 | variable | JSON metadata |
| 20+N | variable | PNG bytes |
Metadata
The metadata is a JSON object with a links array. Each entry contains x, y, w and h normalized to 0–1, an HTTPS url without credentials, and a label of up to 120 characters. Maximums: 64 links and 64 KiB of metadata.
Limits
- Image ≤ 16 MiB · edge ≤ 8192 px · ≤ 16,000,000 pixels
- Download MIME provisional: application/octet-stream
- Version 0.1 is unsigned · integrity ≠ destination safety
Reference implementation: web/limg.mjs · tests/limg.test.mjs · docs/SPEC-DRAFT.md