From 653e5afd9cc1047d60f3faed8f772cb82d26368d Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sun, 14 May 2017 18:00:11 +0200 Subject: [PATCH] RGB24 formaton --- src/formats.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/formats.rs b/src/formats.rs index 3f7ae7f..c477723 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -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 } -- 2.39.5