Struct BmpEncoder
struct BmpEncoder<'a, W: 'a> { ... }
The representation of a BMP encoder.
Implementations
impl<'a, W: Write + 'a> BmpEncoder<'a, W>
fn new(w: &'a mut W) -> SelfCreate a new encoder that writes its output to
w.fn encode(self: &mut Self, image: &[u8], width: u32, height: u32, c: ExtendedColorType) -> ImageResult<()>Encodes the image
imagethat has dimensionswidthandheightandExtendedColorTypec.Panics
Panics if
width * height * c.bytes_per_pixel() != image.len().fn encode_with_palette(self: &mut Self, image: &[u8], width: u32, height: u32, c: ExtendedColorType, palette: Option<&[[u8; 3]]>) -> ImageResult<()>Same as
encode, but allow a palette to be passed in. Thepaletteis ignored for color types other than Luma/Luma-with-alpha.Panics
Panics if
width * height * c.bytes_per_pixel() != image.len().
impl<'a, W> Freeze for BmpEncoder<'a, W>
impl<'a, W> RefUnwindSafe for BmpEncoder<'a, W>
impl<'a, W> Send for BmpEncoder<'a, W>
impl<'a, W> Sync for BmpEncoder<'a, W>
impl<'a, W> Unpin for BmpEncoder<'a, W>
impl<'a, W> UnsafeUnpin for BmpEncoder<'a, W>
impl<'a, W> UnwindSafe for BmpEncoder<'a, W>
impl<T> Any for BmpEncoder<'a, W>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for BmpEncoder<'a, W>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for BmpEncoder<'a, W>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for BmpEncoder<'a, W>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for BmpEncoder<'a, W>
unsafe fn init(init: <T as Pointable>::Init) -> usizeunsafe fn deref<'a>(ptr: usize) -> &'a Tunsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tunsafe fn drop(ptr: usize)
impl<T, U> Into for BmpEncoder<'a, W>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for BmpEncoder<'a, W>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for BmpEncoder<'a, W>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<W: Write> ImageEncoder for BmpEncoder<'_, W>
fn write_image(self: Self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>