fn overwrite_pixel(rgb: &[u8], bits: u32, bits_length: u8)-> [u8; 3]{
        let original_pixel_value: u32 = ((rgb[0] as u32) << 16) + ((rgb[1] as u32) << 8) + (rgb[2] as u32);
        let modified_pixel_value = (original_pixel_value & mask::<u32>(bits_length, true)) + bits;
        let modified_pixel_bytes = u24_to_bytes(modified_pixel_value);
        modified_pixel_bytes
    }
/// Called by self.encode_bits() to get which value should have host pixel after data hidding.
Called by self.encode_bits() to get which value should have host pixel after data hidding.
Called by self . encode_bits () to get which value should have host pixel after data hidding .
fn overwrite_pixel(rgb: &[u8], bits: u32, bits_length: u8)-> [u8; 3]{
        let original_pixel_value: u32 = ((rgb[0] as u32) << 16) + ((rgb[1] as u32) << 8) + (rgb[2] as u32);
        let modified_pixel_value = (original_pixel_value & mask::<u32>(bits_length, true)) + bits;
        let modified_pixel_bytes = u24_to_bytes(modified_pixel_value);
        modified_pixel_bytes
    }
fn overwrite_pixel ( rgb : & [ u8 ] , bits : u32 , bits_length : u8 ) -> [ u8 ; 3 ] { let original_pixel_value : u32 = ( ( rgb [ 0 ] as u32 ) << 16 ) + ( ( rgb [ 1 ] as u32 ) << 8 ) + ( rgb [ 2 ] as u32 ) ; let modified_pixel_value = ( original_pixel_value & mask :: < u32 > ( bits_length , true ) ) + bits ; let modified_pixel_bytes = u24_to_bytes ( modified_pixel_value ) ; modified_pixel_bytes }
Called by self.encode_bits() to get which value should have host pixel after data hidding.
Called by self . encode_bits () to get which value should have host pixel after data hidding .
rgb
&[u8]
bits
u32
bits_length
u8
rgb
&[u8]
bits
u32
bits_length
u8