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:
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)

qoi_image_transport.qoi_codec.encode(raw, config=None)

Encode the given raw image into a sensor_msgs/CompressedImage with “qoi” codec.

Parameters:
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:

(sensor_msgs/CompressedImage or None, str)