2 releases

0.1.1 Mar 27, 2021
0.1.0 Mar 27, 2021

#17 in #visualizer

37 downloads per month
Used in ffmpeg-frame-grabber

MIT license

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(())
}

Screenshot

Dependencies

~14MB
~94K SLoC