changeset 14723 | 29dbe9ce8b7d |
parent 14228 | bb2f301d4fe0 |
child 15850 | 44b49f255e31 |
--- a/rust/land2d/src/lib.rs Thu Mar 21 01:23:05 2019 +0300 +++ b/rust/land2d/src/lib.rs Fri Mar 22 18:01:08 2019 +0200 @@ -30,6 +30,12 @@ &self.pixels.as_slice() } + pub fn raw_pixel_bytes(&self) -> &[u8] { + unsafe { + self.pixels.as_bytes() + } + } + #[inline] pub fn width(&self) -> usize { self.pixels.width()