Struct freeimage::Bitmap [−][src]
pub struct Bitmap { /* fields omitted */ }
Implementations
impl Bitmap
[src]
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]
fif: Format,
filename: P
) -> Result<Bitmap, Error>
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]
ty: Type,
width: usize,
height: usize,
bpp: usize,
data: Option<&[T]>
) -> Bitmap
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>ⓘ
[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]
Notable traits for ScanLinesMut<'a>
impl<'a> Iterator for ScanLinesMut<'a> type Item = &'a mut [u8];
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]
&self,
w: usize,
h: usize,
filter: Filter
) -> Result<Bitmap, Error>
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]
&mut self,
bitmap: &Bitmap,
channel: ColorChannel
) -> Result<(), Error>