qoi_image_transport package¶
qoi_image_transport.qoi_codec module¶
Encoding and decoding of images compressed with the ‘qoi’ transport.
-
qoi_image_transport.qoi_codec.
decode
(compressed, config=None)¶ Decode the given sensor_msgs/CompressedImage encoded with “qoi” codec into a raw image.
Parameters: - compressed (
sensor_msgs/CompressedImage
) – The compressed image. - config (dict) – Not used.
Returns: Tuple of raw image and error string. If decoding failed, the image is
None
and error string is filled.Return type: (
sensor_msgs/Image
or None, str)- compressed (
-
qoi_image_transport.qoi_codec.
encode
(raw, config=None)¶ Encode the given raw image into a sensor_msgs/CompressedImage with “qoi” codec.
Parameters: - raw (
sensor_msgs/Image
) – The raw image. - config (dict) – Not used.
Returns: Tuple of compressed image and error string. If the compression fails (e.g. wrong image dimensions or bit depth), the image is
None
and error string is filled.Return type: - raw (