aspix 0.1.0

Library Rust yang powerful untuk mengkonversi gambar menjadi ASCII art
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use aspix::AsciiConverter;
use std::fs;

fn main() {
    let converter = AsciiConverter::new(100, 50);
    
    // Gunakan path relatif ke root proyek
    match fs::read("examples/image.png") {
        Ok(image_bytes) => {
            match converter.convert_from_bytes(&image_bytes) {
                Ok(ascii) => println!("{}", ascii),
                Err(e) => eprintln!("Error konversi: {}", e)
            }
        },
        Err(e) => eprintln!("Error membaca file: {}", e)
    }
}