1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
/*! Riddle crate for loading and manipulating image data in main memory. Built largely on the back of `::image` and its dependencies. # Example ``` # use riddle_image::*; # fn main() -> Result<(), ImageError> { // Load an image from a png let png_bytes = include_bytes!("../../example_assets/image.png"); let png_img = Image::new_from_png(std::io::Cursor::new(&png_bytes[..]))?; // Make a blank image and blit the png on to it let mut blank_img = Image::new(256, 256); blank_img.blit(&png_img, [0, 0].into()); # Ok (()) } ``` */ mod error; mod image; mod imageview; pub use self::image::*; pub use error::*; pub use riddle_common::Color; use self::imageview::*; use riddle_common::CommonError; type Result<R> = std::result::Result<R, ImageError>;