How to convert DynamicImage into rgba array of bytes? #2479
Unanswered
ghmendonca
asked this question in
Q&A
Replies: 1 comment
-
|
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to convert DynamicImage into rgba array of bytes?
I'm trying to convert a DynamicImage into a Vec where each element in the array is the byte for the rgba pixel of the image.
Basically what I need to do is to generate a thumb hash of the image, and for that I need the rgba array of pixels. As far as I understand, DynamicImage doesn't have any pixel related function, so I would have to create an ImageBuffer from the bytes of the DynamicImage and do some operations, but I can't find exactly which functions of the ImageBuffer I need to use to achieve this.
Beta Was this translation helpful? Give feedback.
All reactions