Skip to content

Delnegend/artefact

Repository files navigation

artefact

Decode JPEG without artifacts

  • 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)

Tests

Photo by Aleksandar Pasaric

Photo by Toa Heftiba Şinca

CLI version

Pre-build binaries

WIP

Build

Pre-requisites: Rust toolchain

cargo build --release --package artefact-cli

The binary will be located at ./target/release/artefact-cli

Usage

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

Developement

Directories

License

Licensed under either of

Contribution

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.