Trait image::ImageEncoder [−][src]
The trait all encoders implement
Required methods
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
Writes all the bytes in an image to the encoder.
This function takes a slice of bytes of the pixel data of the image and encodes them. Unlike particular format encoders inherent impl encode methods where endianness is not specified, here image data bytes should always be in native endian. The implementor will reorder the endianess as necessary for the target encoding format.
See also ImageDecoder::read_image
which reads byte buffers into
native endian.
Implementors
impl<'a, W: Write> ImageEncoder for BmpEncoder<'a, W>
[src]
fn write_image(
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<'a, W: Write> ImageEncoder for JpegEncoder<'a, W>
[src]
fn write_image(
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write + Seek> ImageEncoder for TiffEncoder<W>
[src]
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write> ImageEncoder for FarbfeldEncoder<W>
[src]
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write> ImageEncoder for IcoEncoder<W>
[src]
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write> ImageEncoder for PngEncoder<W>
[src]
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write> ImageEncoder for PnmEncoder<W>
[src]
fn write_image(
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
mut self: Self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
impl<W: Write> ImageEncoder for TgaEncoder<W>
[src]
fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>
[src]
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ColorType
) -> ImageResult<()>