pub fn to_buf(&self) -> [u8; HEADER_SIZE] {
        [
            self.id_size,
            if self.has_color_map { 1 } else { 0 },
            self.image_type as u8,
            self.color_map_first_index as u8 & 0xff,
            (self.color_map_first_index >> 8) as u8,
            self.color_map_size as u8 & 0xff,
            (self.color_map_size >> 8) as u8,
            self.color_map_bit_depth,
            self.x_origin as u8 & 0xff,
            (self.x_origin >> 8) as u8,
            self.y_origin as u8 & 0xff,
            (self.y_origin >> 8) as u8,
            self.width as u8 & 0xff,
            (self.width >> 8) as u8,
            self.height as u8 & 0xff,
            (self.height >> 8) as u8,
            self.image_bit_depth,
            self.descriptor
        ]
    }
/// Returns the header as a byte array.
Returns the header as a byte array.
Returns the header as a byte array .
pub fn to_buf(&self) -> [u8; HEADER_SIZE] {
        [
            self.id_size,
            if self.has_color_map { 1 } else { 0 },
            self.image_type as u8,
            self.color_map_first_index as u8 & 0xff,
            (self.color_map_first_index >> 8) as u8,
            self.color_map_size as u8 & 0xff,
            (self.color_map_size >> 8) as u8,
            self.color_map_bit_depth,
            self.x_origin as u8 & 0xff,
            (self.x_origin >> 8) as u8,
            self.y_origin as u8 & 0xff,
            (self.y_origin >> 8) as u8,
            self.width as u8 & 0xff,
            (self.width >> 8) as u8,
            self.height as u8 & 0xff,
            (self.height >> 8) as u8,
            self.image_bit_depth,
            self.descriptor
        ]
    }
pub fn to_buf ( & self ) -> [ u8 ; HEADER_SIZE ] { [ self . id_size , if self . has_color_map { 1 } else { 0 } , self . image_type as u8 , self . color_map_first_index as u8 & 0xff , ( self . color_map_first_index >> 8 ) as u8 , self . color_map_size as u8 & 0xff , ( self . color_map_size >> 8 ) as u8 , self . color_map_bit_depth , self . x_origin as u8 & 0xff , ( self . x_origin >> 8 ) as u8 , self . y_origin as u8 & 0xff , ( self . y_origin >> 8 ) as u8 , self . width as u8 & 0xff , ( self . width >> 8 ) as u8 , self . height as u8 & 0xff , ( self . height >> 8 ) as u8 , self . image_bit_depth , self . descriptor ] }
Returns the header as a byte array.
Returns the header as a byte array .
&self
&self