pub struct TiffEncoder<W, K: TiffKind = TiffKindStandard> { /* private fields */ }
Expand description

Encoder for Tiff and BigTiff files.

With this type you can get a DirectoryEncoder or a ImageEncoder to encode Tiff/BigTiff ifd directories with images.

See DirectoryEncoder and ImageEncoder.

Examples

use tiff::encoder::*;

// create a standard Tiff file
let mut tiff = TiffEncoder::new(&mut file).unwrap();
tiff.write_image::<colortype::RGB8>(100, 100, &image_data).unwrap();

// create a BigTiff file
let mut bigtiff = TiffEncoder::new_big(&mut file).unwrap();
bigtiff.write_image::<colortype::RGB8>(100, 100, &image_data).unwrap();

Implementations

Constructor functions to create standard Tiff files.

Creates a new encoder for standard Tiff files.

To create BigTiff files, use new_big or new_generic.

Constructor functions to create BigTiff files.

Creates a new encoder for BigTiff files.

To create standard Tiff files, use new or new_generic.

Generic functions that are available for both Tiff and BigTiff encoders.

Creates a new Tiff or BigTiff encoder, inferred from the return type.

Create a DirectoryEncoder to encode an ifd directory.

Create an ImageEncoder to encode an image one slice at a time.

Create an ImageEncoder to encode an image one slice at a time.

Convenience function to write an entire image from memory.

Convenience function to write an entire image from memory with a given compression.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.