Struct Encoding
pub struct Encoding { pub compression: Compression, pub blocks: Blocks, pub line_order: LineOrder }
How the pixels are split up and compressed.
Fields
compression: CompressionHow the pixel data of all channels in this layer is compressed. May be
Compression::Uncompressed. Seelayer.attributesfor more attributes.blocks: BlocksDescribes how the pixels of this layer are divided into smaller blocks. Either splits the image into its scan lines or splits the image into tiles of the specified size. A single block can be loaded without processing all bytes of a file.
line_order: LineOrderIn what order the tiles of this header occur in the file. Does not change any actual image orientation. See
layer.attributesfor more attributes.
Implementations
impl Encoding
const FAST_LOSSLESS: Self = _;Run-length encoding with tiles of 64x64 pixels. This is the recommended default encoding. Almost as fast as uncompressed data, but optimizes single-colored areas such as mattes and masks.
const SMALL_FAST_LOSSLESS: Self = _;PIZ compression with tiles of 256x256 pixels. Small images, not too slow.
const SMALL_LOSSLESS: Self = _;ZIP compression with blocks of 16 lines. Slow, but produces small files without visible artefacts.
const UNCOMPRESSED: Self = _;No compression. Massive space requirements. Fast, because it minimizes data shuffling and reallocation.
Trait Implementations
impl Clone for Encoding
fn clone(&self) -> Self
impl Copy for Encoding
impl Debug for Encoding
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Encoding
fn default() -> Self
impl PartialEq for Encoding
fn eq(&self, other: &Self) -> bool