/// Most compression methods will reconstruct the exact pixel bytes,
/// but some might throw away unimportant data for specific types of samples.
Most compression methods will reconstruct the exact pixel bytes,
but some might throw away unimportant data for specific types of samples.
Most compression methods will reconstruct the exact pixel bytes but some might throw away unimportant data for specific types of samples .
pub fn is_lossless_for(self, sample_type: SampleType) -> bool {
        use self::Compression::*;
        match self {
            PXR24 => sample_type != SampleType::F32, // pxr reduces f32 to f24
            B44 | B44A => sample_type != SampleType::F16, // b44 only compresses f16 values, others are left uncompressed
            Uncompressed | RLE | ZIP1 | ZIP16 | PIZ => true,
            DWAB(_) | DWAA(_) => false,
        }
    }
pub fn is_lossless_for ( self , sample_type : SampleType ) -> bool { use self :: Compression :: * ; match self { PXR24 => sample_type != SampleType :: F32 , // pxr reduces f32 to f24 B44 | B44A => sample_type != SampleType :: F16 , // b44 only compresses f16 values, others are left uncompressed Uncompressed | RLE | ZIP1 | ZIP16 | PIZ => true , DWAB ( _ ) | DWAA ( _ ) => false , } }
Most compression methods will reconstruct the exact pixel bytes,
but some might throw away unimportant data for specific types of samples.
Most compression methods will reconstruct the exact pixel bytes but some might throw away unimportant data for specific types of samples .
self
sample_type
SampleType