4个版本
| 0.2.1 | 2019年1月3日 | 
|---|---|
| 0.2.0 | 2019年1月3日 | 
| 0.1.1 | 2018年12月31日 | 
| 0.1.0 | 2018年12月31日 | 
#7 在 #排序器
650KB
403 行
eilpx
一个基于红色、绿色、蓝色、alpha或亮度值对图像进行像素排序的命令行工具。
安装
需要 Rust 2018。可以使用以下命令通过 crates.io 安装 Eilpx。
cargo install eilpx
使用方法
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
示例
命令
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
| 原始 | 排序后 | 
|---|---|
|  |  | 
命令
# sorts leftwards based on luma with min bound of 50
eilpx -i img/lighthouse.jpg -o img/lighthouse_sorted.jpg -d left
| 原始 | 排序后 | 
|---|---|
|  |  | 
依赖项
~15–23MB
~149K SLoC