pub trait Get {
Show 14 methods
// Required methods
fn get_pixel_array_offset(&self) -> usize;
fn get_height(&self) -> u32;
fn get_width(&self) -> u32;
fn get_bits_per_pixel(&self) -> u8;
fn get_file_size(&self) -> u32;
fn get_size_of_info_header(&self) -> u32;
fn get_planes(&self) -> u16;
fn get_compression(&self) -> u32;
fn get_image_size(&self) -> u32;
fn get_colors_used(&self) -> u32;
fn get_important_colors(&self) -> u32;
fn get_padding_size(&self) -> u32;
fn get_padding_per_line(&self) -> u8;
fn get_pixel(&self, point: &Point) -> Result<Rgb, String>;
}
Expand description
A trait for accessing metadata and pixel-level data from a bitmap.
Required Methods§
Sourcefn get_pixel_array_offset(&self) -> usize
fn get_pixel_array_offset(&self) -> usize
Returns the byte offset where the pixel array starts in the image file.
Sourcefn get_height(&self) -> u32
fn get_height(&self) -> u32
Returns the height of the image in pixels.
Sourcefn get_bits_per_pixel(&self) -> u8
fn get_bits_per_pixel(&self) -> u8
Returns the number of bits per pixel (e.g., 24 for RGB, 32 for RGBA).
Sourcefn get_file_size(&self) -> u32
fn get_file_size(&self) -> u32
Returns the total size of the image file in bytes.
Sourcefn get_size_of_info_header(&self) -> u32
fn get_size_of_info_header(&self) -> u32
Returns the size of the info header (40 bytes for BITMAPINFOHEADER).
Sourcefn get_planes(&self) -> u16
fn get_planes(&self) -> u16
Returns the number of color planes (usually 1).
Sourcefn get_compression(&self) -> u32
fn get_compression(&self) -> u32
Returns the compression method used
0 = BI_RGB no compression
1 = BI_RLE8 8bit RLE encoding
2 = BI_RLE4 4bit RLE encoding
Sourcefn get_image_size(&self) -> u32
fn get_image_size(&self) -> u32
Returns the compressed image size. It is valid to set this =0 if Compression = 0
Sourcefn get_colors_used(&self) -> u32
fn get_colors_used(&self) -> u32
Returns the number of colors used in the bitmap (0 = default).
Sourcefn get_important_colors(&self) -> u32
fn get_important_colors(&self) -> u32
Returns the number of important colors (0 = all colors are important).
Sourcefn get_padding_size(&self) -> u32
fn get_padding_size(&self) -> u32
Returns the total size of padding bytes added to the image data.
Sourcefn get_padding_per_line(&self) -> u8
fn get_padding_per_line(&self) -> u8
Returns the number of padding bytes per scan line.