Struct exr::image::write::WriteImageWithOptions [−][src]
pub struct WriteImageWithOptions<'img, Layers, OnProgress> { /* fields omitted */ }
Expand description
A temporary writer which can be configured and used to write an image to a file.
Implementations
impl<'img, Layers, OnProgress> WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: WritableLayers<'img>,
OnProgress: FnMut(f64),
[src]
impl<'img, Layers, OnProgress> WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: WritableLayers<'img>,
OnProgress: FnMut(f64),
[src]pub fn infer_meta_data(&self) -> Headers
[src]
pub fn infer_meta_data(&self) -> Headers
[src]Generate file meta data for this image. The meta data structure is close to the data in the file.
pub fn non_parallel(self) -> Self
[src]
pub fn non_parallel(self) -> Self
[src]Do not compress multiple pixel blocks on multiple threads at once. Might use less memory and synchronization, but will be slower in most situations.
pub fn skip_compatibility_checks(self) -> Self
[src]
pub fn skip_compatibility_checks(self) -> Self
[src]Skip some checks that ensure a file can be opened by other exr software. For example, it is no longer checked that no two headers or two attributes have the same name, which might be an expensive check for images with an exorbitant number of headers.
If you write an uncompressed file and need maximum speed, it might save a millisecond to disable the checks, if you know that your file is not invalid any ways. I do not recommend this though, as the file might not be readably by any other exr library after that. You must care for not producing an invalid file yourself.
pub fn on_progress(self, on_progress: OnProgress) -> Self where
OnProgress: FnMut(f64),
[src]
pub fn on_progress(self, on_progress: OnProgress) -> Self where
OnProgress: FnMut(f64),
[src]Specify a function to be called regularly throughout the writing process. Replaces all previously specified progress functions in this reader.
#[must_use]pub fn to_file(self, path: impl AsRef<Path>) -> UnitResult
[src]
#[must_use]pub fn to_file(self, path: impl AsRef<Path>) -> UnitResult
[src]Write the exr image to a file.
Use to_unbuffered
instead, if you do not have a file.
If an error occurs, attempts to delete the partially written file.
#[must_use]pub fn to_unbuffered(self, unbuffered: impl Write + Seek) -> UnitResult
[src]
#[must_use]pub fn to_unbuffered(self, unbuffered: impl Write + Seek) -> UnitResult
[src]Buffer the writer and then write the exr image to it.
Use to_buffered
instead, if your writer is an in-memory buffer.
Use to_file
instead, if you have a file path.
If your writer cannot seek, you can write to an in-memory vector of bytes first, using to_buffered
.
#[must_use]pub fn to_buffered(self, write: impl Write + Seek) -> UnitResult
[src]
#[must_use]pub fn to_buffered(self, write: impl Write + Seek) -> UnitResult
[src]Write the exr image to a writer.
Use to_file
instead, if you have a file path.
Use to_unbuffered
instead, if this is not an in-memory writer.
If your writer cannot seek, you can write to an in-memory vector of bytes first.
Trait Implementations
impl<'img, Layers: Clone, OnProgress: Clone> Clone for WriteImageWithOptions<'img, Layers, OnProgress>
[src]
impl<'img, Layers: Clone, OnProgress: Clone> Clone for WriteImageWithOptions<'img, Layers, OnProgress>
[src]fn clone(&self) -> WriteImageWithOptions<'img, Layers, OnProgress>
[src]
fn clone(&self) -> WriteImageWithOptions<'img, Layers, OnProgress>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<'img, Layers: Debug, OnProgress: Debug> Debug for WriteImageWithOptions<'img, Layers, OnProgress>
[src]
impl<'img, Layers: Debug, OnProgress: Debug> Debug for WriteImageWithOptions<'img, Layers, OnProgress>
[src]impl<'img, Layers: PartialEq, OnProgress: PartialEq> PartialEq<WriteImageWithOptions<'img, Layers, OnProgress>> for WriteImageWithOptions<'img, Layers, OnProgress>
[src]
impl<'img, Layers: PartialEq, OnProgress: PartialEq> PartialEq<WriteImageWithOptions<'img, Layers, OnProgress>> for WriteImageWithOptions<'img, Layers, OnProgress>
[src]fn eq(&self, other: &WriteImageWithOptions<'img, Layers, OnProgress>) -> bool
[src]
fn eq(&self, other: &WriteImageWithOptions<'img, Layers, OnProgress>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &WriteImageWithOptions<'img, Layers, OnProgress>) -> bool
[src]
fn ne(&self, other: &WriteImageWithOptions<'img, Layers, OnProgress>) -> bool
[src]This method tests for !=
.
impl<'img, Layers, OnProgress> StructuralPartialEq for WriteImageWithOptions<'img, Layers, OnProgress>
[src]
Auto Trait Implementations
impl<'img, Layers, OnProgress> RefUnwindSafe for WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: RefUnwindSafe,
OnProgress: RefUnwindSafe,
Layers: RefUnwindSafe,
OnProgress: RefUnwindSafe,
impl<'img, Layers, OnProgress> Send for WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: Sync,
OnProgress: Send,
Layers: Sync,
OnProgress: Send,
impl<'img, Layers, OnProgress> Sync for WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: Sync,
OnProgress: Sync,
Layers: Sync,
OnProgress: Sync,
impl<'img, Layers, OnProgress> Unpin for WriteImageWithOptions<'img, Layers, OnProgress> where
OnProgress: Unpin,
OnProgress: Unpin,
impl<'img, Layers, OnProgress> UnwindSafe for WriteImageWithOptions<'img, Layers, OnProgress> where
Layers: RefUnwindSafe,
OnProgress: UnwindSafe,
Layers: RefUnwindSafe,
OnProgress: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more