2 releases
0.1.1 | Mar 27, 2021 |
---|---|
0.1.0 | Mar 27, 2021 |
#464 in Visualization
41 downloads per month
Used in ffmpeg-frame-grabber
86KB
242 lines
Visualizer
A crate to visualize image instances of the image
create. Requires the crate visualizer-cli
to be installed globally.
Based on @hediet/visualization which also powers the Debug Visualizer extension for VS Code.
Installation
cargo install visualizer-cli
cargo add image-visualizer
Example
Use the view!
macro to view a visualization.
The visualize
function creates a visualization for the given image.
use image::io::Reader as ImageReader;
use image_visualizer::{VisualizableImage, visualizer::view};
fn main() -> std::io::Result<()> {
let img = ImageReader::open("data/img.png")?.decode().unwrap();
view!(&img.visualize());
Ok(())
}
Dependencies
~6.5MB
~99K SLoC