#tile #seed #image #split #pycasso #image-scramble #scramble-unscramble

bin+lib braque

Split image into tiles and scramble/unscramble them based on a seed

1 unstable release

0.1.0 Jun 29, 2022

#237 in Multimedia

27 downloads per month
Used in piconbiere

BSD-3-Clause

2MB
846 lines

Braque - Scramble/Unscramble Images

License

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

Dependencies

~13MB
~85K SLoC