]> git.nihav.org Git - nihav.git/commitdiff
RGB24 formaton
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 14 May 2017 16:00:11 +0000 (18:00 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sun, 14 May 2017 16:00:11 +0000 (18:00 +0200)
src/formats.rs

index 3f7ae7fb2fd610c3b7b432e82cbe2b800805bd34..c4777231d3eec38e199efe4668f651613cd0d279 100644 (file)
@@ -284,6 +284,14 @@ pub const RGB565_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::
                                             None, None],
                                         elem_size: 2, be: false, alpha: false, palette: false };
 
+pub const RGB24_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::RGB(RGBSubmodel::RGB), components: 3,
+                                        comp_info: [
+                                            chromaton!(packrgb; 8, 0, 2, 3),
+                                            chromaton!(packrgb; 8, 0, 1, 3),
+                                            chromaton!(packrgb; 8, 0, 0, 3),
+                                            None, None],
+                                        elem_size: 3, be: false, alpha: false, palette: false };
+
 impl NAPixelChromaton {
     pub fn get_subsampling(&self) -> (u8, u8) { (self.h_ss, self.v_ss) }
     pub fn is_packed(&self) -> bool { self.packed }