- Written in pure Rust, no
unsafe
code. - WASM-ready, check out the web version, everything runs in your browser.
- ⚡ FASTER, SAFER than the of the original implementation jpeg2png project. (backup link)
WIP
Pre-requisites: Rust toolchain
cargo build --release --package artefact-cli
The binary will be located at ./target/release/artefact-cli
Usage: artefact-cli [OPTIONS] <INPUT>
Arguments:
<INPUT>
The input jpeg file
Options:
-o, --output <OUTPUT>
The output png file
Default: input file with png extension
-y, --overwrite
Overwrite existing output file
-w, --weight <WEIGHT>
Second order weight
Higher values give smoother transitions with less staircasing
Default: 0.3 for all channels, use comma separated values for each channel
-p, --pweight <PWEIGHT>
Probability weight
Higher values make the result more similar to the source JPEG
Default: 0.001 for all channels, use comma separated values for each channel
-i, --iterations <ITERATIONS>
Iterations
Higher values give better results but take more time
Default: 50 for all channels, use comma separated values for each channel
-s, --spearate-components <SPEARATE_COMPONENTS>
Separate components
Separately optimize components instead of all together
Default: false
[possible values: true, false]
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
artefact-lib
- the implementation and pipelineartefact-cli
- command-line interface wrapperartefact-wasm
- thewasm-pack
wrapper designed to build WebAssembly (WASM) modules compatible with modern browserszune-jpeg
- a minimized fork ofzune-jpeg
exposes the underlying DCT coefficients and quantization tables.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-Apache or apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or opensource.org/licenses/MIT) at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.