imgnect

LIMG · EXPERIMENTAL

Specification draft 0.1

Experimental binary container. Multi-byte integers are big-endian. The first codec stores the original PNG without recompression.

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 offsetSizeField
08Magic bytes 4c 49 4d 47 0d 0a 1a 0a
81Major version (major) = 0
91Minor version (minor) = 1
101Codec = 1 (PNG)
111Flags = 0
124UTF-8 JSON length in bytes
164PNG payload length in bytes
20variableJSON metadata
20+NvariablePNG 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

Reference implementation: web/limg.mjs · tests/limg.test.mjs · docs/SPEC-DRAFT.md