Crate convert_image

Source
Expand description

Conversion functions to convert between image formats.

This crate contains a number of functions and helper types allow converting to and from types specified in the machine_vision_formats crate, such as the trait machine_vision_formats::ImageData.

Enums§

EncoderOptions
How to encode to an image buffer
Error
Possible errors

Functions§

convert_into
Convert input image, a reference to a trait object implementing HasRowChunksExact<SRC>, into a mutable reference to an already allocated destination frame implementing HasRowChunksExactMut<DEST>.
convert_owned
Convert input, a frame implementing OwnedImageStride<SRC>, into an output implementing HasRowChunksExact<DEST>.
convert_ref
Convert input image, a reference to a trait object implementing HasRowChunksExact<SRC>, into an output implementing HasRowChunksExact<DEST>.
force_pixel_format
Force interpretation of data from frame into another pixel_format.
force_pixel_format_ref
Force interpretation of data from frame into another pixel_format.
frame_to_encoded_buffer
Convert any type implementing HasRowChunksExact to a Jpeg or Png buffer using the EncoderOptions specified.
frame_to_image
Convert any type implementing HasRowChunksExact to an image::DynamicImage.
image_to_rgb8
Convert an input image::DynamicImage to an RGB8 image.