pub fn img2webplossless(image: &DynamicImage) -> Result<Blob>
Expand description

Encodes a DynamicImage into WebP lossless format and returns it as a Blob.

Arguments

  • image - A reference to a DynamicImage that is to be encoded.

Panics

This function will panic if the image color type is not Rgb8, since currently only 8-bit RGB is supported for WebP lossless encoding.

Returns

A Blob containing the WebP-encoded image data.