mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-10-08 01:11:09 +00:00
Add into_vec method
This commit is contained in:
@@ -105,6 +105,14 @@ impl<'a> Image<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn into_vec(self) -> Vec<u8> {
|
||||
match self.pixels {
|
||||
PixelsContainer::MutU8(p) => p.into(),
|
||||
PixelsContainer::VecU8(v) => v,
|
||||
}
|
||||
}
|
||||
|
||||
/// Mutable buffer with image pixels.
|
||||
#[inline(always)]
|
||||
fn buffer_mut(&mut self) -> &mut [u8] {
|
||||
|
||||
Reference in New Issue
Block a user