#shogi #image #chess #position #japanese #visualize #generate

shogi-img

library for generating images that visualize the position in Shogi (Japanese chess)

3 releases (breaking)

0.3.0 Jul 26, 2024
0.2.0 Jan 18, 2024
0.1.0 Jan 18, 2024

#447 in Images

Download history 121/week @ 2024-07-23 11/week @ 2024-07-30 11/week @ 2024-09-10 8/week @ 2024-09-17 14/week @ 2024-09-24 34/week @ 2024-10-01 4/week @ 2024-10-08

71 downloads per month

MIT license

770KB
270 lines

shogi-img

Rust

shogi-img is a library for generating images that visualize the position in Shogi (Japanese chess).

Example

use shogi_img::pos2img;
use shogi_usi_parser::FromUsi;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let pos = shogi_core::PartialPosition::from_usi(
        "sfen 3sks3/9/4S4/9/1+B7/9/9/9/9 b S2rb4g4n4l18p 1",
    )?;
    pos2img(&pos).save("out.png")?;
    Ok(())
}

Image resources

This repository includes images sourced from Shogi Images, which are distributed under the CC0 1.0 Universal license.

Font resources

This repository includes the MonaSpace font by GitHub, licensed under the SIL Open Font License 1.1.

Dependencies

~11MB
~213K SLoC