Enum qoi::Error [−][src]
pub enum Error {
InvalidMagic {
magic: u32,
},
InvalidChannels {
channels: u8,
},
InvalidColorSpace {
colorspace: u8,
},
InvalidImageDimensions {
width: u32,
height: u32,
},
InvalidImageLength {
size: usize,
width: u32,
height: u32,
},
OutputBufferTooSmall {
size: usize,
required: usize,
},
UnexpectedBufferEnd,
InvalidPadding,
IoError(Error),
}
Expand description
Errors that can occur during encoding or decoding.
Variants
InvalidMagic
Fields
magic: u32
Leading 4 magic bytes don’t match when decoding
InvalidChannels
Fields
channels: u8
Invalid number of channels: expected 3 or 4
InvalidColorSpace
Fields
colorspace: u8
Invalid color space: expected 0 or 1
InvalidImageDimensions
Invalid image dimensions: can’t be empty or larger than 400Mp
InvalidImageLength
Image dimensions are inconsistent with image buffer length
OutputBufferTooSmall
Output buffer is too small to fit encoded/decoded image
UnexpectedBufferEnd
Input buffer ended unexpectedly before decoding was finished
InvalidPadding
Invalid stream end marker encountered when decoding
IoError(Error)
Tuple Fields
0: Error
Generic I/O error from the wrapped reader/writer
Trait Implementations
Performs the conversion.