pub struct TiffWriter<W> { /* private fields */ }Expand description
Low-level TIFF file writer.
Implementations§
Source§impl<W: Write + Seek> TiffWriter<W>
impl<W: Write + Seek> TiffWriter<W>
Sourcepub fn new(writer: W, byte_order: ByteOrder) -> Self
pub fn new(writer: W, byte_order: ByteOrder) -> Self
Create a new TIFF writer (does not write header yet).
Sourcepub fn write_header(&mut self) -> RawResult<()>
pub fn write_header(&mut self) -> RawResult<()>
Write the TIFF header. Returns the offset where IFD0 pointer should go.
Sourcepub fn write_ifd(
&mut self,
entries: &mut [IfdEntry],
next_ifd_offset: u32,
) -> RawResult<u64>
pub fn write_ifd( &mut self, entries: &mut [IfdEntry], next_ifd_offset: u32, ) -> RawResult<u64>
Write an IFD at the current position.
Returns the offset of the IFD.
next_ifd_offset is the offset to the next IFD (0 if none).
Sourcepub fn write_image_strip_rgb16(&mut self, data: &[u16]) -> RawResult<(u64, u64)>
pub fn write_image_strip_rgb16(&mut self, data: &[u16]) -> RawResult<(u64, u64)>
Write 16-bit RGB image data as a single strip. Returns (strip_offset, strip_byte_count).
Sourcepub fn update_ifd0_offset(&mut self, offset: u32) -> RawResult<()>
pub fn update_ifd0_offset(&mut self, offset: u32) -> RawResult<()>
Update the IFD0 offset in the header (at byte 4).
Auto Trait Implementations§
impl<W> Freeze for TiffWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for TiffWriter<W>where
W: RefUnwindSafe,
impl<W> Send for TiffWriter<W>where
W: Send,
impl<W> Sync for TiffWriter<W>where
W: Sync,
impl<W> Unpin for TiffWriter<W>where
W: Unpin,
impl<W> UnsafeUnpin for TiffWriter<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for TiffWriter<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more