aboutsummaryrefslogtreecommitdiffstats
path: root/src/formats.rs
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2017-05-14 18:00:11 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2017-05-14 18:00:11 +0200
commit653e5afd9cc1047d60f3faed8f772cb82d26368d (patch)
tree380cba2022c6a948c69d383d5169ae3eac1f01d0 /src/formats.rs
parent89de616c775e58728cacc7065e0e47528a78d9df (diff)
downloadnihav-653e5afd9cc1047d60f3faed8f772cb82d26368d.tar.gz
RGB24 formaton
Diffstat (limited to 'src/formats.rs')
-rw-r--r--src/formats.rs8
1 files changed, 8 insertions, 0 deletions
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 }