From 0cc09358bda53a327937e503e1166bf55b84f319 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 22 Jan 2019 16:27:13 +0100 Subject: [PATCH] public interface for chromaton creation --- nihav-core/src/formats.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nihav-core/src/formats.rs b/nihav-core/src/formats.rs index 53b28dc..952e4c0 100644 --- a/nihav-core/src/formats.rs +++ b/nihav-core/src/formats.rs @@ -404,6 +404,9 @@ pub const RGB24_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::R elem_size: 3, be: false, alpha: false, palette: false }; impl NAPixelChromaton { + pub fn new(h_ss: u8, v_ss: u8, packed: bool, depth: u8, shift: u8, comp_offs: u8, next_elem: u8) -> Self { + Self { h_ss, v_ss, packed, depth, shift, comp_offs, next_elem } + } pub fn get_subsampling(&self) -> (u8, u8) { (self.h_ss, self.v_ss) } pub fn is_packed(&self) -> bool { self.packed } pub fn get_depth(&self) -> u8 { self.depth } -- 2.39.5