Rework ColorSpace to match the latest spec (0 | 1)
This commit is contained in:
parent
c39844fb98
commit
2dcbdd19c2
5 changed files with 81 additions and 95 deletions
|
|
@ -15,7 +15,7 @@ pub enum Error {
|
|||
OutputBufferTooSmall { size: usize, required: usize },
|
||||
InvalidMagic { magic: u32 },
|
||||
UnexpectedBufferEnd,
|
||||
// TODO: invalid colorspace
|
||||
InvalidColorSpace { colorspace: u8 },
|
||||
}
|
||||
|
||||
pub type Result<T> = StdResult<T, Error>;
|
||||
|
|
@ -48,6 +48,9 @@ impl Display for Error {
|
|||
Self::UnexpectedBufferEnd => {
|
||||
write!(f, "unexpected input buffer end while decoding")
|
||||
}
|
||||
Self::InvalidColorSpace { colorspace } => {
|
||||
write!(f, "invalid color space: {} (expected 0 or 1)", colorspace)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue