Struct freeimage::Bitmap[][src]

pub struct Bitmap { /* fields omitted */ }

Implementations

impl Bitmap[src]

pub fn load<P: AsRef<Path>>(filename: P) -> Result<Bitmap, Error>[src]

pub fn load_with_format<P: AsRef<Path>>(
    fif: Format,
    filename: P
) -> Result<Bitmap, Error>
[src]

pub fn load_from_memory(buffer: &[u8]) -> Result<Bitmap, Error>[src]

pub fn new<T: Copy>(
    ty: Type,
    width: usize,
    height: usize,
    bpp: usize,
    data: Option<&[T]>
) -> Bitmap
[src]

pub fn save<P: AsRef<Path>>(&self, filename: P, flags: i32) -> Result<(), Error>[src]

pub fn width(&self) -> usize[src]

pub fn height(&self) -> usize[src]

pub fn bpp(&self) -> usize[src]

pub fn ty(&self) -> Type[src]

pub fn pitch(&self) -> usize[src]

pub fn bits(&self) -> &[u8][src]

pub fn pixels<T>(&self) -> &[T][src]

pub fn bits_mut(&mut self) -> &mut [u8][src]

pub fn pixels_mut<T>(&mut self) -> &mut [T][src]

pub fn scanlines<'a>(&'a self) -> ScanLines<'a>

Notable traits for ScanLines<'a>

impl<'a> Iterator for ScanLines<'a> type Item = &'a [u8];
[src]

pub fn scanlines_mut(&mut self) -> ScanLinesMut<'_>

Notable traits for ScanLinesMut<'a>

impl<'a> Iterator for ScanLinesMut<'a> type Item = &'a mut [u8];
[src]

pub fn flip_vertical(self) -> Result<Bitmap, Error>[src]

pub fn flip_horizontal(self) -> Result<Bitmap, Error>[src]

pub fn rescale(
    &self,
    w: usize,
    h: usize,
    filter: Filter
) -> Result<Bitmap, Error>
[src]

pub fn is_transparent(&self) -> bool[src]

pub fn to_4bits(&self) -> Result<Bitmap, Error>[src]

pub fn to_8bits(&self) -> Result<Bitmap, Error>[src]

pub fn to_greyscale(&self) -> Result<Bitmap, Error>[src]

pub fn to_16bits555(&self) -> Result<Bitmap, Error>[src]

pub fn to_16bits565(&self) -> Result<Bitmap, Error>[src]

pub fn to_24bits(&self) -> Result<Bitmap, Error>[src]

pub fn to_32bits(&self) -> Result<Bitmap, Error>[src]

pub fn to(&self, ty: Type) -> Result<Bitmap, Error>[src]

pub fn red_mask(&self) -> u32[src]

pub fn green_mask(&self) -> u32[src]

pub fn blue_mask(&self) -> u32[src]

pub fn channel(&self, channel: ColorChannel) -> Option<Bitmap>[src]

pub fn set_channel(
    &mut self,
    bitmap: &Bitmap,
    channel: ColorChannel
) -> Result<(), Error>
[src]

Trait Implementations

impl Clone for Bitmap[src]

impl Drop for Bitmap[src]

impl Send for Bitmap[src]

impl Sync for Bitmap[src]

Auto Trait Implementations

impl RefUnwindSafe for Bitmap

impl Unpin for Bitmap

impl UnwindSafe for Bitmap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.