Replies: 1 comment
let mut alpha: Vec<_> = img.to_luma_alpha8().pixels().map(|p| p.0[1]).collect();seems to work well enough. |
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.
Hello, I'm writing some signed distance function code, and I want to use the alpha channel of the image to compute it. What's the most elegant way of getting only the alpha channel of an image?
Ideally I would want something like
image.to_alpha8(), but that doesn't seem to exist. Trying to useluma_alpha8, but it's quite confusing to figure out how to get only the alpha channel from there.All reactions