rust/land2d/src/lib.rs
changeset 14707 29dbe9ce8b7d
parent 14212 bb2f301d4fe0
--- 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()