Struct TgaEncoder
struct TgaEncoder<W: Write> { ... }
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: Self) -> TgaEncoder<W>Disables run-length encoding
fn encode(self: 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().
impl<T> Any for TgaEncoder<W>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for TgaEncoder<W>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for TgaEncoder<W>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for TgaEncoder<W>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Pointable for TgaEncoder<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 TgaEncoder<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 TgaEncoder<W>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for TgaEncoder<W>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<W> Freeze for TgaEncoder<W>
impl<W> RefUnwindSafe for TgaEncoder<W>
impl<W> Send for TgaEncoder<W>
impl<W> Sync for TgaEncoder<W>
impl<W> Unpin for TgaEncoder<W>
impl<W> UnsafeUnpin for TgaEncoder<W>
impl<W> UnwindSafe for TgaEncoder<W>
impl<W: Write> ImageEncoder for TgaEncoder<W>
fn write_image(self: Self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>