pub struct TiffEncoder<W> { /* private fields */ }
Expand description
Encoder for tiff images
Implementations§
Source§impl<W> TiffEncoder<W>
impl<W> TiffEncoder<W>
Sourcepub fn new(w: W) -> TiffEncoder<W>
pub fn new(w: W) -> TiffEncoder<W>
Create a new encoder that writes its output to w
Sourcepub fn encode(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ExtendedColorType,
) -> Result<(), ImageError>
pub fn encode( self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<(), ImageError>
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()
.
Trait Implementations§
Source§impl<W> ImageEncoder for TiffEncoder<W>
impl<W> ImageEncoder for TiffEncoder<W>
Source§fn write_image(
self,
buf: &[u8],
width: u32,
height: u32,
color_type: ExtendedColorType,
) -> Result<(), ImageError>
fn write_image( self, buf: &[u8], width: u32, height: u32, color_type: ExtendedColorType, ) -> Result<(), ImageError>
Writes all the bytes in an image to the encoder. Read more
Source§fn set_icc_profile(
&mut self,
icc_profile: Vec<u8>,
) -> Result<(), UnsupportedError>
fn set_icc_profile( &mut self, icc_profile: Vec<u8>, ) -> Result<(), UnsupportedError>
Set the ICC profile to use for the image. Read more
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> UnwindSafe for TiffEncoder<W>where
W: UnwindSafe,
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
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.