Rework the decoder so it's safe, add bytemuck dep

This commit is contained in:
Ivan Smirnov 2021-12-31 01:44:59 +03:00
commit a9a01c6fbd
4 changed files with 79 additions and 76 deletions

View file

@ -102,6 +102,13 @@ impl<const N: usize> Pixel<N> {
}
}
impl<const N: usize> From<Pixel<N>> for [u8; N] {
#[inline(always)]
fn from(px: Pixel<N>) -> Self {
px.0
}
}
pub trait SupportedChannels {}
impl SupportedChannels for Pixel<3> {}