Crates.io | braque |
lib.rs | braque |
version | 0.1.0 |
source | src |
created_at | 2022-06-29 19:19:18.693557 |
updated_at | 2022-06-29 19:19:18.693557 |
description | Split image into tiles and scramble/unscramble them based on a seed. |
homepage | |
repository | https://github.com/TehUncleDolan/braque |
max_upload_size | |
id | 615650 |
size | 1,964,598 |
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.
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.
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());
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
.
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.