Struct TgaEncoder
pub struct TgaEncoder<W: Write> { /* private fields */ }
TGA encoder.
Implementations
impl<W: Write> TgaEncoder<W>
fn new(w: W) -> TgaEncoder<W>Create a new encoder that writes its output to
w.fn disable_rle(self) -> TgaEncoder<W>Disables run-length encoding
fn encode(self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>Encodes the image
bufthat has dimensionswidthandheightandColorTypecolor_type.The dimensions of the image must be between 0 and 65535 (inclusive) or an error will be returned.
Panics
Panics if
width * height * color_type.bytes_per_pixel() != data.len().
Trait Implementations
impl<W: Write> ImageEncoder for TgaEncoder<W>
fn write_image(self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>