You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, looks like there is no way to get the image as an array of bytes (&[u8]). And since I'm not going to store the image into a file, but instead return the image from a HTTP request, I really need that. Would be nice to have something like image.to_bytes() or image.as_bytes().
Right now I'm getting the bytes by encoding to the same format the image already is, like this:
Right now, looks like there is no way to get the image as an array of bytes (
&[u8]
). And since I'm not going to store the image into a file, but instead return the image from a HTTP request, I really need that. Would be nice to have something likeimage.to_bytes()
orimage.as_bytes()
.Right now I'm getting the bytes by encoding to the same format the image already is, like this:
But of course this is allocating more memory that shouldn't be needed.
The text was updated successfully, but these errors were encountered: