Enum image_webp::DecodingError
source · #[non_exhaustive]pub enum DecodingError {
Show 28 variants
IoError(Error),
RiffSignatureInvalid([u8; 4]),
WebpSignatureInvalid([u8; 4]),
ChunkMissing,
ChunkHeaderInvalid([u8; 4]),
ReservedBitSet,
InvalidCompressionMethod,
AlphaChunkSizeMismatch,
ImageTooLarge,
FrameOutsideImage,
LosslessSignatureInvalid(u8),
VersionNumberInvalid(u8),
InvalidColorCacheBits(u8),
HuffmanError,
BitStreamError,
TransformError,
Vp8MagicInvalid([u8; 3]),
NotEnoughInitData,
ColorSpaceInvalid(u8),
LumaPredictionModeInvalid(i8),
IntraPredictionModeInvalid(i8),
ChromaPredictionModeInvalid(i8),
InconsistentImageSizes,
UnsupportedFeature(String),
InvalidParameter(String),
MemoryLimitExceeded,
InvalidChunkSize,
NoMoreFrames,
}
Expand description
Errors that can occur when attempting to decode a WebP image
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IoError(Error)
An IO error occurred while reading the file
RiffSignatureInvalid([u8; 4])
RIFF’s “RIFF” signature not found or invalid
WebpSignatureInvalid([u8; 4])
WebP’s “WEBP” signature not found or invalid
ChunkMissing
An expected chunk was missing
ChunkHeaderInvalid([u8; 4])
Chunk Header was incorrect or invalid in its usage
ReservedBitSet
Some bits were invalid
InvalidCompressionMethod
Invalid compression method
AlphaChunkSizeMismatch
Alpha chunk doesn’t match the frame’s size
ImageTooLarge
Image is too large, either for the platform’s pointer size or generally
FrameOutsideImage
Frame would go out of the canvas
LosslessSignatureInvalid(u8)
Signature of 0x2f not found
VersionNumberInvalid(u8)
Version Number was not zero
InvalidColorCacheBits(u8)
Invalid color cache bits
HuffmanError
An invalid Huffman code was encountered
BitStreamError
The bitstream was somehow corrupt
TransformError
The transforms specified were invalid
Vp8MagicInvalid([u8; 3])
VP8’s [0x9D, 0x01, 0x2A]
magic not found or invalid
NotEnoughInitData
VP8 Decoder initialisation wasn’t provided with enough data
ColorSpaceInvalid(u8)
At time of writing, only the YUV colour-space encoded as 0
is specified
LumaPredictionModeInvalid(i8)
LUMA prediction mode was not recognised
IntraPredictionModeInvalid(i8)
Intra-prediction mode was not recognised
ChromaPredictionModeInvalid(i8)
Chroma prediction mode was not recognised
InconsistentImageSizes
Inconsistent image sizes
UnsupportedFeature(String)
The file may be valid, but this crate doesn’t support decoding it.
InvalidParameter(String)
Invalid function call or parameter
MemoryLimitExceeded
Memory limit exceeded
InvalidChunkSize
Invalid chunk size
NoMoreFrames
No more frames in image