1 unstable release
0.1.0 | Jun 29, 2022 |
---|
#271 in Multimedia
Used in piconbiere
2MB
846 lines
Braque - Scramble/Unscramble Images
Overview
Split image into tiles and scramble/unscramble them based on a seed.
It can be used via a command-line interface or as a library in other Rust programs.
Installing
Pre-compiled binaries can be downloaded from the Releases page.
Alternatively, braque can be installed from Cargo, via the following command:
cargo install braque --features cli
Braque can be built from source using the latest stable or nightly Rust. This is primarily useful for developing on braque.
git clone https://github.com/TehUncleDolan/braque.git
cd braque
cargo build --release --features cli
cp target/release/braque /usr/local/bin
Braque follows Semantic Versioning.
Library Usage
let block_size = BlockSize::try_from(50).expect("valid block size");
let seed = "SECRET";
let output = scramble(&input_image, block_size, seed.as_bytes());
let original = unscramble(&output, block_size, seed.as_bytes());
Usage
Braque can also be used as a command-line utility. Basic usage looks similar to the following:
braque --mode scramble --seed SECRET -b 50 -i foo.png -o foo-scrambled.png
seed
is used to randomized the scrambling (the same seed must be used to
restore the original image).
More details can be found by running braque -h
.
Credits
-
Braque is a Rust version of Pycasso, itself inspired by image-scramble.
-
Sample image is taken from Pepper&Carrot by David Revoy licensed under CC BY 4.0.
Dependencies
~5MB
~88K SLoC