]> git.nihav.org Git - nihav.git/commitdiff
nihav_core/scale: fix the case when unpacking with discarding alpha
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 2 Dec 2025 17:09:27 +0000 (18:09 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 2 Dec 2025 17:09:27 +0000 (18:09 +0100)
nihav-core/src/scale/repack.rs

index 506e396430f2c6dbe9dd4dddb9f4846ebe4ca424..c967bfc344173699fb754d143e458d04585a0275 100644 (file)
@@ -155,6 +155,7 @@ impl Kernel for UnpackKernel {
         df.comp_info[..self.ncomps].clone_from_slice(&chr[..self.ncomps]);
         df.components = self.ncomps as u8;
         df.palette = false;
+        df.alpha = in_fmt.fmt.alpha && dest_fmt.fmt.alpha;
         if debug {
             println!(" [intermediate format {}]", df);
         }