How to convert a PreAlpha into [u8; 4]?
#440
suguruwataru
started this conversation in
General
Replies: 1 comment 5 replies
-
|
Hi, thanks for the kind words, I'm glad it's appreciated. 😊 You are right, there's currently no direct support built in. The snag, apart from a lack of an |
Beta Was this translation helpful? Give feedback.
5 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Firstly, thank you for the great work!
The question is in the title. The use case is to convert data read from image directly into a premultiplied memory buffer for further processing. I feel it's a pretty common use case but I can't find an obvious way of doing it. There are more convoluted ways of doing this, like directly computing on the public member variables or taking advantage of that
PreAlphaDerefs into theRgbit wraps (Rgbonly converts to[u8; 3]and alpha needs to be added back), but I want to know whether there is a method that is more concise and idiomatic.Beta Was this translation helpful? Give feedback.
All reactions