dotmax 0.1.7

High-performance terminal braille rendering for images, animations, and graphics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Save SVG Rasterization - Debug tool to see rasterized output

use dotmax::image::load_svg_from_path;
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let svg_path = Path::new("tests/fixtures/svg/svg_test.svg");

    println!("Loading SVG: {}", svg_path.display());
    let img = load_svg_from_path(svg_path, 160, 96)?;

    // Save rasterized image to see what it looks like
    img.save("svg_raster_output.png")?;
    println!("Saved rasterized SVG to: svg_raster_output.png");
    println!("Check this image to see how resvg rasterized the SVG");

    Ok(())
}