Fields
contents: Vec<u8>
Implementations
sourceimpl BMP
impl BMP
pub fn new(height: i32, width: u32) -> BMP
pub fn new_from_file(file_path: &str) -> BMP
pub fn num_bytes_to_kilobytes(bytes: u32) -> u32
pub fn get_header(&self) -> BITMAPFILEHEADER
pub fn get_size(&self, use_header: bool) -> u32
pub fn get_dib_header(&self) -> Result<DIBHEADER, ErrorKind>
pub fn get_pixel_data(&self) -> Result<VecDeque<Vec<Vec<u8>>>, ErrorKind>
pub fn get_color_of_px(&self, x: usize, y: usize) -> Result<[u8; 4], ErrorKind>
pub fn change_color_of_pixel(
&mut self,
x: u16,
y: u16,
new_color: [u8; 4]
) -> Result<(), ErrorKind>
pub fn draw_image(&mut self, x: u16, y: u16, bmp2: BMP)
pub fn change_opacity(&mut self, opacity: u8)
pub fn invert(&mut self, invert_alpha: Option<bool>)
pub fn draw_line(&mut self, fill: [u8; 4], p1: [u16; 2], p2: [u16; 2])
pub fn draw_rectangle(
&mut self,
fill: Option<[u8; 4]>,
stroke: Option<[u8; 4]>,
p1: [u16; 2],
p2: [u16; 2]
)
pub fn draw_ellipse(
&mut self,
center: [u16; 2],
xlength: u16,
ylength: u16,
stroke: [u8; 4],
fill: Option<[u8; 4]>,
guess: bool
)
pub fn fill_bucket(
&mut self,
fill: [u8; 4],
x: usize,
y: usize
) -> Result<Vec<[u16; 2]>, ErrorKind>
pub fn save_to_new(self, file_path: &str)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BMP
impl Send for BMP
impl Sync for BMP
impl Unpin for BMP
impl UnwindSafe for BMP
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more