| Crates.io | pixdown |
| lib.rs | pixdown |
| version | 0.1.1 |
| created_at | 2024-11-02 02:10:22.966063+00 |
| updated_at | 2025-09-17 03:19:38.953255+00 |
| description | Markup language for Pixelart and animation |
| homepage | |
| repository | https://github.com/Nakanoin19/pixdown |
| max_upload_size | |
| id | 1432581 |
| size | 149,806 |
ドットアニメーションに特化したラスタ画像軽量マークアップ言語
Pixdownのデータ構造はヘッダーと内容の2つに分けられます
---
(ヘッダ部分)
---
(内容)
[size]
w = 2 # 幅
h = 2 # 高さ
scale = 256 # 拡大(縦, 横ともにscale倍)
frames = 8 # フレームの数
rate = [1, 4] # フレーム間隔 ([0]/[1] s)
[colors] # 色の定義
"0" = "#000000"
"1" = "#ffffff"
[options] # オプション(なくてもよい)
order = [1, 0, 1, 0, 0, 1, 0, 0] # 順序指定
# 0
## 0
10
01
## 1
01
10
#: レイヤー番号
##: フレーム番号


cargo add pixdown
use pixdown::compile;
use std::fs::{File, read_to_string};
use std::io::Write;
fn main() {
let text = read_to_string("example.pixdown").unwrap();
if let Ok(b) = compile(&text) {
let mut file = File::create("image.png").unwrap();
file.write_all(&b).unwrap();
file.flush().unwrap();
}
}
リファレンス実装が動かせます
cargo run -- [Pixdownファイル] [出力先]
私に寄付するくらいなら私のファンアートを描くか私の曲を聴くかしてください
それでも寄付したい人はAblazeに寄付してあげてください
Rion Hobby Licenseで公開しています