[−][src]Enum exr::compression::Compression
Specifies which compression method to use. Use uncompressed data for fastest loading and writing speeds. Use RLE compression for fast loading and writing with slight memory savings. Use ZIP compression for slow processing with large memory savings.
Variants
Store uncompressed values. Produces large files that can be read and written very quickly. Consider using RLE instead, as it provides some compression with almost equivalent speed.
Produces slightly smaller files that can still be read and written rather quickly. The compressed file size is usually between 60 and 75 percent of the uncompressed size. Works best for images with large flat areas, such as masks and abstract graphics. This compression method is lossless.
Uses ZIP compression to compress each line. Slowly produces small images which can be read with moderate speed. This compression method is lossless. Might be slightly faster but larger than `ZIP16´.
Uses ZIP compression to compress blocks of 16 lines. Slowly produces small images which can be read with moderate speed. This compression method is lossless. Might be slightly slower but smaller than `ZIP1´.
PIZ compression works well for noisy and natural images. Works better with larger tiles. Only supported for flat images, but not for deep data. This compression method is lossless.
Like ZIP1
, but reduces precision of f32
images to f24
.
This produces really small image files. Only supported for flat images, not for deep data.
This lossy compression is not yet supported by this implementation.
This lossy compression is not yet supported by this implementation.
This lossy compression is not yet supported by this implementation.
This lossy compression is not yet supported by this implementation.
Implementations
impl Compression
[src]
pub fn compress_image_section(
self,
header: &Header,
uncompressed: ByteVec,
pixel_section: IntegerBounds
) -> Result<ByteVec>
[src]
self,
header: &Header,
uncompressed: ByteVec,
pixel_section: IntegerBounds
) -> Result<ByteVec>
Compress the image section of bytes.
pub fn decompress_image_section(
self,
header: &Header,
compressed: ByteVec,
pixel_section: IntegerBounds,
pedantic: bool
) -> Result<ByteVec>
[src]
self,
header: &Header,
compressed: ByteVec,
pixel_section: IntegerBounds,
pedantic: bool
) -> Result<ByteVec>
Decompress the image section of bytes.
pub fn scan_lines_per_block(self) -> usize
[src]
For scan line images and deep scan line images, one or more scan lines may be stored together as a scan line block. The number of scan lines per block depends on how the pixel data are compressed.
pub fn supports_deep_data(self) -> bool
[src]
Deep data can only be compressed using RLE or ZIP compression.
impl Compression
[src]
pub fn byte_size() -> usize
[src]
Number of bytes this would consume in an exr file.
pub fn write<W: Write>(self, write: &mut W) -> UnitResult
[src]
Without validation, write this instance to the byte stream.
pub fn read<R: Read>(read: &mut R) -> Result<Self>
[src]
Read the value without validating.
Trait Implementations
impl Clone for Compression
[src]
fn clone(&self) -> Compression
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Compression
[src]
impl Debug for Compression
[src]
impl Display for Compression
[src]
impl PartialEq<Compression> for Compression
[src]
fn eq(&self, other: &Compression) -> bool
[src]
fn ne(&self, other: &Compression) -> bool
[src]
impl StructuralPartialEq for Compression
[src]
Auto Trait Implementations
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnwindSafe for Compression
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,