pub struct TiffEncoder { /* private fields */ }Expand description
Encodes a baseline TIFF.
Implementations§
Source§impl TiffEncoder
impl TiffEncoder
Sourcepub const fn new() -> TiffEncoder
pub const fn new() -> TiffEncoder
An encoder writing uncompressed strips.
Sourcepub fn with_layout(self, layout: TiffLayout) -> Result<TiffEncoder, PixelsError>
pub fn with_layout(self, layout: TiffLayout) -> Result<TiffEncoder, PixelsError>
An encoder writing the given layout.
§Errors
Returns PixelsError::InvalidArgument for a zero-sized layout, or
tile dimensions that are not multiples of 16 — which TIFF 6.0
§Section 15 requires and every reader relies on.
Sourcepub const fn with_deflate(self, level: Level) -> TiffEncoder
pub const fn with_deflate(self, level: Level) -> TiffEncoder
An encoder compressing with Deflate at level.
Sourcepub fn from_options(options: &EncodeOptions) -> TiffEncoder
pub fn from_options(options: &EncodeOptions) -> TiffEncoder
An encoder configured from generic encode options.
TIFF is lossless, so quality is read as compression effort: below the midpoint means store uncompressed and prioritise speed, above it means Deflate at a level scaled from the remaining range.
Sourcepub const fn layout(&self) -> TiffLayout
pub const fn layout(&self) -> TiffLayout
The layout this encoder writes.
Trait Implementations§
Source§impl Debug for TiffEncoder
impl Debug for TiffEncoder
Source§impl Default for TiffEncoder
impl Default for TiffEncoder
Source§fn default() -> TiffEncoder
fn default() -> TiffEncoder
Returns the “default value” for a type. Read more
Source§impl Encoder for TiffEncoder
impl Encoder for TiffEncoder
Source§fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
Embed
profile as the image’s ICC colour profile, or write none. Read moreSource§fn write_header(
&mut self,
desc: &ImageDescriptor,
_sink: &mut dyn Sink,
) -> Result<(), PixelsError>
fn write_header( &mut self, desc: &ImageDescriptor, _sink: &mut dyn Sink, ) -> Result<(), PixelsError>
Begin an image, writing any container header. Read more
Auto Trait Implementations§
impl Freeze for TiffEncoder
impl RefUnwindSafe for TiffEncoder
impl Send for TiffEncoder
impl Sync for TiffEncoder
impl Unpin for TiffEncoder
impl UnsafeUnpin for TiffEncoder
impl UnwindSafe for TiffEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more