[][src]Module exr::image

Read and write an exr image. Use exr::image::simple or exr::image::full for actually reading a complete image.

Modules

read_options

A collection of preset ReadOptions values.

rgba

Read and write a truly minimal RGBA image. This module loads only images with RGBA channels if they all have the same data type (either f16, f32, or u32). Returns Error::Invalid if not at least one image part with RGB channels can be found in the file.

simple

Read and write all supported aspects of an exr image, excluding deep data and multiresolution levels. Use exr::image::full if you do need deep data or resolution levels.

write_options

A collection of preset WriteOptions values.

Structs

BlockIndex

Specifies where a block of pixel data should be placed in the actual image. This is a globally unique identifier which includes the layer, level index, and pixel location.

LineIndex

Specifies where a row of pixels lies inside an image. This is a globally unique identifier which includes the layer, channel index, and pixel location.

LineSlice

A single line of pixels. Use LineRef or LineRefMut for easier type names.

ReadOptions

Specify how to read an exr image.

UncompressedBlock

Contains a block of pixel data and where that data should be placed in the actual image.

WriteOptions

Specify how to write an exr image.

Traits

OnReadProgress

Called occasionally when reading a file. Implemented by any closure that matches |progress: f32| -> UnitResult.

OnWriteProgress

Called occasionally when writing a file. Implemented by any closure that matches |progress: f32, bytes_written: usize| -> UnitResult.

Functions

for_compressed_blocks_in_image

Compress all chunks in the image described by meta_data and get_line. Calls write_chunk for each compressed chunk, while respecting the line_order of the image.

read_all_compressed_chunks_from_buffered

Read all chunks without seeking. Returns the meta data, number of chunks, and a compressed chunk reader. Does not buffer the reader, you should always pass a BufReader.

read_all_lines_from_buffered

Reads and decompresses all chunks of a file sequentially without seeking. Will not skip any parts of the file. Does not buffer the reader, you should always pass a BufReader.

read_filtered_chunks_from_buffered

Read all desired chunks, possibly seeking. Skips all chunks that do not match the filter. Returns the compressed chunks. Does not buffer the reader, you should always pass a BufReader.

read_filtered_lines_from_buffered

Reads ad decompresses all desired chunks of a file sequentially, possibly seeking. Will skip any parts of the file that do not match the specified filter condition. Will never seek if the filter condition matches all chunks. Does not buffer the reader, you should always pass a BufReader.

uncompressed_image_blocks_ordered

Iterate over all uncompressed blocks of an image. The image contents are collected by the get_line function parameter. Returns blocks in LineOrder::Increasing, unless the line order is requested to be decreasing.

write_all_lines_to_buffered

Compresses and writes all lines of an image described by meta_data and get_line to the writer. Flushes the writer to explicitly handle all errors.

Type Definitions

LineRef

An reference to a single line of pixels. May go across the whole image or just a tile section of it.

LineRefMut

A reference to a single mutable line of pixels. May go across the whole image or just a tile section of it.