[−][src]Struct tinybmp::Bmp
A BMP-format bitmap
Fields
header: Header
Image header
Methods
impl<'a> Bmp<'a>
[src]
pub fn from_slice(bytes: &'a [u8]) -> Result<Self, ()>
[src]
Create a bitmap object from a byte array
This method keeps a slice of the original input and does not dynamically allocate memory. The input data must live for as long as this BMP instance does.
pub fn image_data(&'a self) -> &'a [u8]
[src]
Get a reference to the range of bytes that represents the pixel data in the image
pub fn width(&self) -> u32
[src]
Get the image width in pixels
pub fn height(&self) -> u32
[src]
Get the image height in pixels
pub fn dimensions(&self) -> (u32, u32)
[src]
Get image dimensions as (width, height)
in pixels
pub fn bpp(&self) -> u32
[src]
Get the BPP (bits per pixel) for this image
Trait Implementations
impl<'a> Clone for Bmp<'a>
[src]
fn clone(&self) -> Bmp<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Copy for Bmp<'a>
[src]
impl<'a> Debug for Bmp<'a>
[src]
impl<'a> Eq for Bmp<'a>
[src]
impl<'a> Hash for Bmp<'a>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> IntoIterator for &'a Bmp<'a>
[src]
type Item = Pixel
The type of the elements being iterated over.
type IntoIter = BmpIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> Ord for Bmp<'a>
[src]
fn cmp(&self, other: &Bmp<'a>) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Bmp<'a>> for Bmp<'a>
[src]
impl<'a> PartialOrd<Bmp<'a>> for Bmp<'a>
[src]
fn partial_cmp(&self, other: &Bmp<'a>) -> Option<Ordering>
[src]
fn lt(&self, other: &Bmp<'a>) -> bool
[src]
fn le(&self, other: &Bmp<'a>) -> bool
[src]
fn gt(&self, other: &Bmp<'a>) -> bool
[src]
fn ge(&self, other: &Bmp<'a>) -> bool
[src]
impl<'a> StructuralEq for Bmp<'a>
[src]
impl<'a> StructuralPartialEq for Bmp<'a>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,