publishing commit
This commit is contained in:
parent
dc9c37908d
commit
209968af33
5 changed files with 26 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
/target
|
||||
/.direnv
|
||||
*.png
|
||||
perf.*
|
||||
|
|
|
|||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -50,7 +50,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "imgsyn"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"png",
|
||||
]
|
||||
|
|
|
|||
11
Cargo.toml
11
Cargo.toml
|
|
@ -1,7 +1,14 @@
|
|||
[package]
|
||||
name = "imgsyn"
|
||||
version = "0.1.0"
|
||||
description = "Image synthesizer"
|
||||
license = "MIT"
|
||||
repository = "https://git.tudbut.de/tudbut/imgsyn"
|
||||
version = "1.0.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
png = "0.18.0"
|
||||
png = { version = "0.18.0", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["png"]
|
||||
png = ["dep:png"]
|
||||
|
|
|
|||
14
README.md
Normal file
14
README.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# ImgSyn Image Synthesizer
|
||||
|
||||
ImgSyn is an image synthesizer written in rust, capable
|
||||
of applying layered effects and transformations to a canvas
|
||||
to produce an image. The image can then be given out as a PNG,
|
||||
or accessed from rust directly.
|
||||
|
||||
Notably, ImgSyn uses the same model as rust iterators, just for
|
||||
images.
|
||||
|
||||

|
||||
|
||||
See the tests in lib.rs for some examples.
|
||||
|
||||
|
|
@ -80,6 +80,7 @@ pub trait ImgSyn: Clone {
|
|||
let painted = self.paint(meta);
|
||||
PaintedCanvas::rgba255(&painted)
|
||||
}
|
||||
#[cfg(feature = "png")]
|
||||
fn png(self, meta: Canvas) -> Vec<u8> {
|
||||
let painted = self.paint(meta);
|
||||
let mut data = Vec::new();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue