]> git.nihav.org Git - nihav.git/blobdiff - nihav-core/src/formats.rs
scaler initial work
[nihav.git] / nihav-core / src / formats.rs
index 20404bdfc7391855109e1658c2e9cc746e0a3e58..f7ef8d881caedeb4a8f7062293cb089d49fea814 100644 (file)
@@ -420,9 +420,9 @@ pub const RGB565_FORMAT: NAPixelFormaton = NAPixelFormaton { model: ColorModel::
 
 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),
+                                            chromaton!(packrgb; 8, 0, 1, 3),
+                                            chromaton!(packrgb; 8, 0, 2, 3),
                                             None, None],
                                         elem_size: 3, be: false, alpha: false, palette: false };
 
@@ -505,6 +505,7 @@ impl NAPixelFormaton {
     pub fn is_paletted(&self) -> bool { self.palette }
     pub fn get_elem_size(&self) -> u8 { self.elem_size }
     pub fn is_unpacked(&self) -> bool {
+        if self.palette { return false; }
         for chr in self.comp_info.iter() {
             if let Some(ref chromaton) = chr {
                 if chromaton.is_packed() { return false; }