Expand description
Binary image envelope on the Zenoh image key.
Version 3 keeps the version-2 geometry offsets, then carries a bounded JSON metadata object in the same packet as its pixels. The fixed prefix is 24 bytes, all integers little endian:
| Offset | Size | Field |
|---|---|---|
| 0 | 2 | magic 0x4746 |
| 2 | 1 | version 3 |
| 3 | 1 | pixel format code |
| 4 | 4 | width |
| 8 | 4 | height |
| 12 | 4 | sequence counter |
| 16 | 4 | row stride, or 0 for continuous packing |
| 20 | 4 | metadata JSON byte length, at most 64 KiB |
Metadata bytes follow, then the image pixels. Length 0 means no metadata.
Structs§
- Frame
Header - Geometry and optional metadata for the pixels that follow it.
Enums§
- Frame
Header Error - A malformed or unrepresentable image envelope.
Constants§
- FRAME_
MAGIC - Little-endian image magic, bytes
[0x46, 0x47]. - HEADER_
SIZE - Fixed prefix size, excluding the optional metadata object and pixels.
- SUPPORTED_
VERSION - The only supported image envelope version.
Functions§
- pixel_
format_ to_ u8 - The one-byte code the frame header carries
formatas; 0 for a format without one. - u8_
to_ pixel_ format - The format a frame header’s one-byte code names;
PixelFormat::Unknown(0)for 0 and for a code this table does not know.