Open ghmendonca opened 11 months ago
Also tried the following:
let encoder = Encoder::from_image(&self.image).unwrap();
let encoded = encoder.encode(90f32);
let image = Decoder::new(encoded.as_bytes())
.decode()
.unwrap()
.to_image();
But the image returned from the decoder is broken.
When I use the
Encoder
to load aDynamicImage
, and then encode that image to webp, theencode
function returnsWebPMemory
. The issue is that I want to perform more actions with the image, like resizing and there is no easy way to convertWebPMemory
back toDynamicImage
.I can see the
WebPImage
has ato_image
function that converts back toDynamicImage
but for some reason, it's not possible to create aWebPImage
fromWebPMemory
, in fact, theWebPImage::new
is not even public.Is there a way to convert
WebPMemory
toDynamicImage
? If not, how hard it is to implement that and release a new version to support this?