Struct WriteImageWithOptions
pub struct WriteImageWithOptions<'img, Layers, OnProgress> { /* private fields */ }
A temporary writer which can be configured and used to write an image to a file.
Implementations
impl<'img, L, F> WriteImageWithOptions<'img, L, F>
where
L: WritableLayers<'img>,
F: FnMut(f64),
fn infer_meta_data(&self) -> HeadersGenerate file meta data for this image. The meta data structure is close to the data in the file.
fn non_parallel(self) -> SelfDo not compress multiple pixel blocks on multiple threads at once. Might use less memory and synchronization, but will be slower in most situations.
fn skip_compatibility_checks(self) -> SelfSkip 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.
fn on_progress<OnProgress>(self, on_progress: OnProgress) -> WriteImageWithOptions<'img, L, OnProgress> where OnProgress: FnMut(f64),Specify a function to be called regularly throughout the writing process. Replaces all previously specified progress functions in this reader.
fn to_file(self, path: impl AsRef<Path>) -> UnitResultWrite the exr image to a file. Use
to_unbufferedinstead, if you do not have a file. If an error occurs, attempts to delete the partially written file.fn to_unbuffered(self, unbuffered: impl Write + Seek) -> UnitResultBuffer the writer and then write the exr image to it. Use
to_bufferedinstead, if your writer is an in-memory buffer. Useto_fileinstead, if you have a file path. If your writer cannot seek, you can write to an in-memory vector of bytes first, usingto_buffered.fn to_buffered(self, write: impl Write + Seek) -> UnitResultWrite the exr image to a writer. Use
to_fileinstead, if you have a file path. Useto_unbufferedinstead, 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>
fn clone(&self) -> Self
impl<'img, Layers: Debug, OnProgress: Debug> Debug for WriteImageWithOptions<'img, Layers, OnProgress>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'img, Layers: PartialEq, OnProgress: PartialEq> PartialEq for WriteImageWithOptions<'img, Layers, OnProgress>
fn eq(&self, other: &Self) -> bool