img_type describes the semantic content of the image (“rgb”,
“depth”, “segmentation”, …). encoding_format describes the
wire encoding of data — empty string for a raw ndarray (or a
raw pixel-buffer reshaped into one), or one of {“jpeg”, “png”,
“webp”} when data is the encoded bytes from a camera firmware /
image-transport plugin. The two are orthogonal: a JPEG is still
semantically an RGB image after decoding.
Fields
image data (H x W x C ndarray for raw, or the encoded byte blob when
encoding_format is set)."" for raw pixel data; “jpeg” / “png” / “webp” when
data is encoded bytes. Use Image.decode() to lazily turn encoded bytes into an ndarray.Constructor
Signature
Methods
decode()
Signature
self.data) when the image is already an ndarray.
from_dict()
Signature
to_dict()
Signature
encoding_format; the receiver reconstructs via
from_dict without reshaping. For ndarrays we fall back
to the legacy raw-bytes-with-shape/dtype path.