Struct tiff::encoder::TiffEncoder
source · [−]pub struct TiffEncoder<W> { /* private fields */ }
Expand description
Tiff encoder.
With this type you can get a DirectoryEncoder
or a ImageEncoder
to encode tiff ifd directories with images.
See DirectoryEncoder
and ImageEncoder
.
Examples
use tiff::encoder::*;
let mut tiff = TiffEncoder::new(&mut file).unwrap();
tiff.write_image::<colortype::RGB8>(100, 100, &image_data).unwrap();
Implementations
sourceimpl<W: Write + Seek> TiffEncoder<W>
impl<W: Write + Seek> TiffEncoder<W>
pub fn new(writer: W) -> TiffResult<TiffEncoder<W>>
sourcepub fn new_directory(&mut self) -> TiffResult<DirectoryEncoder<'_, W>>
pub fn new_directory(&mut self) -> TiffResult<DirectoryEncoder<'_, W>>
Create a DirectoryEncoder
to encode an ifd directory.
sourcepub fn new_image<C: ColorType>(
&mut self,
width: u32,
height: u32
) -> TiffResult<ImageEncoder<'_, W, C>>
pub fn new_image<C: ColorType>(
&mut self,
width: u32,
height: u32
) -> TiffResult<ImageEncoder<'_, W, C>>
Create an ‘ImageEncoder’ to encode an image one slice at a time.
Auto Trait Implementations
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> UnwindSafe for TiffEncoder<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more