#sorting #pixel #sorter #command-line-tool

app eilpx

Command line tool to pixel sort images based on colour, alpha, or luma values

4 releases

0.2.1 Jan 3, 2019
0.2.0 Jan 3, 2019
0.1.1 Dec 31, 2018
0.1.0 Dec 31, 2018

#6 in #sorter

ISC license

650KB
403 lines

eilpx

crates.io Build Status

A command line tool to pixel sort images based on red, green, blue, alpha, or luma values.

Installation

Requires Rust 2018. Eilpx can be installed via crates.io with the following command.

cargo install eilpx

Usage

USAGE:
    eilpx [FLAGS] [OPTIONS] --input <input> --output <output>

FLAGS:
    -h, --help       Prints help information
    -y               Overwrite output files without asking
    -n               Do not overwrite output files, exit immediately if output file already exists
    -V, --version    Prints version information
    -v               Sets the level of verbosity

OPTIONS:
    -b, --bound <bound>            Sets threshold to be max or min [default: min]  [possible values: min, max]
    -d, --direction <direction>    Sets direction of sorting [default: right]  [possible values: up, right, down, left]
    -i, --input <input>            Sets the input file
    -m, --mode <mode>              Sets mode of sorting [default: luma]  [possible values: red, green, blue, alpha,
                                   luma]
    -o, --output <output>          Sets the output file
    -t, --threshold <threshold>    Sets threshold of sorting

Examples

Command

eilpx -i img/tamsui.jpg -o img/tamsui_sorted.jpg -b max -t 175
#  -i img/tamsui.jpg           input file
#  -o img/tamsui_sorted.jpg    output file
#  -b max -t 175               sort only pixels with a max luma value of 175
Original Sorted
Original Sorted

Command

# sorts leftwards based on luma with min bound of 50
eilpx -i img/lighthouse.jpg -o img/lighthouse_sorted.jpg -d left
Original Sorted
Original Sorted

Dependencies

~7–15MB
~164K SLoC