pub enum DecodeError {
NotTiff,
NoImage,
MissingTag(u16),
InvalidTag(u16),
UnsupportedLayout,
UnsupportedCompression(u16),
UnsupportedPredictor(u16),
UnsupportedPlanarConfiguration,
EmptyImage,
TooLarge {
width: u32,
height: u32,
},
Truncated,
CorruptData,
}Expand description
Why a TIFF file could not be decoded.
Variants§
NotTiff
The data does not start with a TIFF header.
NoImage
The file has no image directory.
MissingTag(u16)
A tag the image needs is missing.
InvalidTag(u16)
A tag has a value of the wrong type or out of range.
UnsupportedLayout
The layout of samples is not one Pillow reads: the combination of photometric interpretation, sample format, fill order, bits per sample and extra samples.
UnsupportedCompression(u16)
A compression scheme other than none, PackBits, LZW and Deflate.
UnsupportedPredictor(u16)
A predictor other than none and horizontal differencing of 8- or 16-bit samples.
UnsupportedPlanarConfiguration
Samples stored in separate planes.
EmptyImage
A side of the image is zero.
TooLarge
The image has more pixels than the input can hold, or than Pillow accepts.
Truncated
A strip or tile lies outside the file.
CorruptData
A strip or tile does not decompress to the data it should hold.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()