functional BMP reader / writer
This commit is contained in:
parent
f4910dba19
commit
b0bcaa43ce
5 changed files with 29 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
/target
|
/target
|
||||||
*.lock
|
*.lock
|
||||||
|
bmp/out.bmp
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = ["bent", "bingus", "bong"]
|
members = ["bent", "bent-funny-zone", "bingus", "bong"]
|
||||||
package.edition = "2021"
|
package.edition = "2021"
|
||||||
package.license = "Unlicense"
|
package.license = "Unlicense"
|
||||||
package.description = "databending made easy"
|
package.description = "databending made easy"
|
||||||
|
|
16
bent-funny-zone/Cargo.toml
Normal file
16
bent-funny-zone/Cargo.toml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[package]
|
||||||
|
name = "bent-funny-zone"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
description.workspace = true
|
||||||
|
authors.workspace = true
|
||||||
|
repository.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
anyhow = "1.0.86"
|
||||||
|
bmp = "0.5.0"
|
||||||
|
synfx-dsp = "0.5.6"
|
10
bent-funny-zone/src/main.rs
Normal file
10
bent-funny-zone/src/main.rs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
use std::fs::File;
|
||||||
|
|
||||||
|
use anyhow::Result;
|
||||||
|
use bmp::open;
|
||||||
|
|
||||||
|
fn main() -> Result<()> {
|
||||||
|
let bmp = open("bmp/sample_640×426.bmp")?;
|
||||||
|
bmp.to_writer(&mut File::create("bmp/out.bmp")?)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
BIN
bmp/sample_640×426.bmp
Normal file
BIN
bmp/sample_640×426.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 799 KiB |
Loading…
Reference in a new issue