use std::path::PathBuf; #[derive(Debug, thiserror::Error)] pub enum PixstripError { #[error("Failed to load image '{path}': {reason}")] ImageLoad { path: PathBuf, reason: String }, #[error("Unsupported format: {format}")] UnsupportedFormat { format: String }, #[error("I/O error: {0}")] Io(#[from] std::io::Error), #[error("Output file already exists: {path}")] OutputExists { path: PathBuf }, #[error("Processing error in '{operation}': {reason}")] Processing { operation: String, reason: String }, #[error("Preset error: {0}")] Preset(String), #[error("Configuration error: {0}")] Config(String), } pub type Result = std::result::Result;