Expand description
image2 - a high-performance image processing library with wide support for a variety of file formats and data types
OpenImageIO is used for encoding and decoding images, it should be installed before
building image2
.
use image2::*;
fn main() -> Result<(), Error> {
// Load an image from disk
let image = Image::<f32, Rgb>::open("images/A.exr")?;
// Apply a `Filter`, in this case using the `Convert` filter to
// convert from `Rgb` to `Gray`
let conv = filter::convert::<f32, Rgb, f32, Gray>();
let mut dest = image.new_like_with_color::<Gray>();
dest.apply(conv, &[&image]);
// This is equivalent to:
let conv = filter::convert();
let dest: Image<f32, Gray> = image.run(conv, None);
// Save an image to disk
dest.save("test.jpg")?;
Ok(())
}
Re-exports
Modules
Image processing filters
Image input/output
Convolutions kernels
Text
OpenGL interop
Image transforms
Display images
Structs
A
Filter
that can be executed using asyncasync-friendly
Pipeline
Four-channel, cyan, magenta, yellow and black
Wraps image data slices, tagging them with a Color type
Wraps mutable image data slices, tagging them with a Color type
Single-channel grayscale
Hash is used for content-based hashing
Image histogram
Three-channel hue, saturation and value color
Image type
Filter input
Image metadata
Memory-mapped image data
Pipelines are used to compose several filters
Normalized image data
Three-channel red, green, blue
Four-channel red, green, blue with alpha channel
Log space, three-channel red, green, blue
Log space, four-channel red, green, blue with alpha channel
Three-channel CIE-XYZ
Three-channel, luma, blue projection and red projection
Enums
AsyncMode is used to schedule the type of iteration for an
AsyncFilter
Enumerates possible errors
Used to determine if a filter can be executed and interleaved at the pixel level or if the
whole filter needs to be evaulated before moving to the next filter
Traits
Color
trait is used to define color spacesFilters are used to manipulate images in a generic, composable manner
Filter extension methods
ImageData is used to hold pixel data for images
Parallel version of the standard iterator trait.
Type is used to represent supported image data types