Skip to content

Commit

Permalink
feat: added oxipng encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
SalOne22 committed Mar 13, 2024
1 parent 7f32068 commit 4a824dc
Show file tree
Hide file tree
Showing 5 changed files with 530 additions and 3 deletions.
256 changes: 256 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ codegen-units = 1
opt-level = "z"

[features]
default = ["resize", "quantization", "mozjpeg", "threads"]
default = ["resize", "quantization", "mozjpeg", "oxipng", "threads"]

# Enables utilization of threads
threads = ["imagequant?/threads", "mozjpeg?/parallel"]
threads = ["imagequant?/threads", "mozjpeg?/parallel", "oxipng?/parallel"]

# Enables resize operation
resize = ["dep:fast_image_resize"]
Expand All @@ -31,12 +31,15 @@ quantization = ["dep:imagequant", "dep:rgb"]

# Enables mozjpeg codec
mozjpeg = ["dep:mozjpeg"]
# Enables oxipng codec
oxipng = ["dep:oxipng"]

[dependencies]
zune-core = "0.4.12"
log = "0.4.21"
zune-image = { version = "0.4.15", default-features = false }
fast_image_resize = { version = "3.0.4", optional = true }
imagequant = { version = "4.3.0", default-features = false, optional = true }
rgb = { version = "0.8.37", optional = true }
mozjpeg = { version = "0.10.7", default-features = false, features = ["with_simd"], optional = true }
log = "0.4.21"
oxipng = { version = "9.0", default-features = false, features = ["zopfli", "filetime"], optional = true }
2 changes: 2 additions & 0 deletions src/codecs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#[cfg(feature = "mozjpeg")]
pub mod mozjpeg;
#[cfg(feature = "oxipng")]
pub mod oxipng;
Loading

0 comments on commit 4a824dc

Please sign in to comment.