use std::io;

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("{0}")]
    Io(#[from] io::Error),
    #[error("Application error: {0}")]
    Colors(#[from] libcolors::error::Error),
    #[error("Unrecognized/unsupported image format")]
    UnknownFormat,

    #[error("PNG decode error: {0}")]
    PngDecode(#[from] png::DecodingError),
    #[error("JPEG decode error: {0}")]
    JpegDecode(#[from] pixie::jpeg::Error),
    #[error("Corrupt image")]
    CorruptImage,
}
