Struct TiffEncoder

pub struct TiffEncoder<W> { /* private fields */ }

Encoder for tiff images

Implementations

impl<W: Write + Seek> TiffEncoder<W>

fn new(w: W) -> TiffEncoder<W>

Create a new encoder that writes its output to w

fn encode(self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>

See the trait method write_image for more details.

Trait Implementations

impl<W: Write + Seek> ImageEncoder for TiffEncoder<W>

fn write_image(self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType) -> ImageResult<()>

Encodes the image image that has dimensions width and height and ColorType c.

16-bit types assume the buffer is native endian.

Panics

Panics if width * height * color_type.bytes_per_pixel() != data.len().

fn set_icc_profile(&mut self, icc_profile: Vec<u8>) -> Result<(), UnsupportedError>

Auto Trait Implementations

impl<W> Freeze for TiffEncoder<W> where W: Freeze,

impl<W> RefUnwindSafe for TiffEncoder<W> where W: RefUnwindSafe,

impl<W> Send for TiffEncoder<W> where W: Send,

impl<W> Sync for TiffEncoder<W> where W: Sync,

impl<W> Unpin for TiffEncoder<W> where W: Unpin,

impl<W> UnsafeUnpin for TiffEncoder<W> where W: UnsafeUnpin,

impl<W> UnwindSafe for TiffEncoder<W> where W: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for TiffEncoder<W> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for TiffEncoder<W> where ST: ?Sized, DT: ?Sized,

impl<T> Any for TiffEncoder<W> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for TiffEncoder<W> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for TiffEncoder<W> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for TiffEncoder<W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for TiffEncoder<W>

impl<T> Pointable for TiffEncoder<W>

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for TiffEncoder<W> where T: ?Sized,

impl<T, U> Into<U> for TiffEncoder<W> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for TiffEncoder<W> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for TiffEncoder<W> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>