pub struct Encoding {
pub compression: Compression,
pub blocks: Blocks,
pub line_order: LineOrder,
}
Expand description
How the pixels are split up and compressed.
Fields§
§compression: Compression
How the pixel data of all channels in this layer is compressed. May be Compression::Uncompressed
.
See layer.attributes
for more attributes.
blocks: Blocks
Describes 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: LineOrder
In what order the tiles of this header occur in the file.
Does not change any actual image orientation.
See layer.attributes
for more attributes.
Implementations§
source§impl Encoding
impl Encoding
sourcepub const UNCOMPRESSED: Encoding = _
pub const UNCOMPRESSED: Encoding = _
No compression. Massive space requirements. Fast, because it minimizes data shuffling and reallocation.
sourcepub const FAST_LOSSLESS: Encoding = _
pub const FAST_LOSSLESS: Encoding = _
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.
sourcepub const SMALL_LOSSLESS: Encoding = _
pub const SMALL_LOSSLESS: Encoding = _
ZIP compression with blocks of 16 lines. Slow, but produces small files without visible artefacts.
sourcepub const SMALL_FAST_LOSSLESS: Encoding = _
pub const SMALL_FAST_LOSSLESS: Encoding = _
PIZ compression with tiles of 256x256 pixels. Small images, not too slow.
Trait Implementations§
source§impl PartialEq for Encoding
impl PartialEq for Encoding
impl Copy for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.