Struct BmpDecoder

pub struct BmpDecoder<R> { /* private fields */ }

A bmp decoder

Implementations

impl<R: BufRead + Seek> BmpDecoder<R>

fn new(reader: R) -> ImageResult<BmpDecoder<R>>

Create a new decoder that decodes from the stream r

fn new_without_file_header(reader: R) -> ImageResult<BmpDecoder<R>>

Create a new decoder that decodes from the stream r without first reading a BITMAPFILEHEADER. This is useful for decoding the CF_DIB format directly from the Windows clipboard.

fn set_indexed_color(&mut self, indexed_color: bool)

If true, the palette in BMP does not apply to the image even if it is found. In other words, the output image is the indexed color.

fn get_palette(&self) -> Option<&[[u8; 3]]>

Get the palette that is embedded in the BMP image, if any.

Trait Implementations

impl<R: BufRead + Seek> ImageDecoder for BmpDecoder<R>

fn dimensions(&self) -> (u32, u32)
fn color_type(&self) -> ColorType
fn read_image(self, buf: &mut [u8]) -> ImageResult<()>
fn read_image_boxed(self: Box<Self>, buf: &mut [u8]) -> ImageResult<()>

impl<R: BufRead + Seek> ImageDecoderRect for BmpDecoder<R>

fn read_rect(&mut self, x: u32, y: u32, width: u32, height: u32, buf: &mut [u8], row_pitch: usize) -> ImageResult<()>

Auto Trait Implementations

impl<R> Freeze for BmpDecoder<R> where R: Freeze,

impl<R> RefUnwindSafe for BmpDecoder<R> where R: RefUnwindSafe,

impl<R> Send for BmpDecoder<R> where R: Send,

impl<R> Sync for BmpDecoder<R> where R: Sync,

impl<R> Unpin for BmpDecoder<R> where R: Unpin,

impl<R> UnsafeUnpin for BmpDecoder<R> where R: UnsafeUnpin,

impl<R> UnwindSafe for BmpDecoder<R> where R: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for BmpDecoder<R> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for BmpDecoder<R> where ST: ?Sized, DT: ?Sized,

impl<T> Any for BmpDecoder<R> where T: 'static + ?Sized,

impl<T> Borrow<T> for BmpDecoder<R> where T: ?Sized,

impl<T> BorrowMut<T> for BmpDecoder<R> where T: ?Sized,

impl<T> From<T> for BmpDecoder<R>

impl<T> IntoEither for BmpDecoder<R>

impl<T> Pointable for BmpDecoder<R>

impl<T> Read<Exclusive, BecauseExclusive> for BmpDecoder<R> where T: ?Sized,

impl<T, U> Into<U> for BmpDecoder<R> where U: From<T>,

impl<T, U> TryFrom<U> for BmpDecoder<R> where U: Into<T>,

impl<T, U> TryInto<U> for BmpDecoder<R> where U: TryFrom<T>,