filmborders

Crates.iofilmborders
lib.rsfilmborders
version0.0.32
sourcesrc
created_at2022-08-29 04:21:32.893498
updated_at2022-10-07 10:24:43.350694
descriptionadd hipster film borders to your images :)
homepagehttps://film-borders.romnn.com
repositoryhttps://github.com/romnn/film-borders
max_upload_size
id654168
size3,242,123
Roman Dahm (romnn)

documentation

README

Film Borders in WASM

If you have a modern browser, you can use the live WASM web version here.

Installation

You can use the web application that uses WASM or the CLI tool for batch processing.

To install the CLI, run

cargo install filmborders --bin film-borders

For local testing, you can also install the current version locally:

cargo install --bin film-borders --path .

Benchmarking

sudo apt install linux-tools-common linux-tools-generic linux-`tools-name -r`
cargo install flamegraph
sudo cargo flamegraph -o my_flamegraph.svg -- apply --image ./samples/sample1.jpg --output ./output/sample1.png --border 0 --scale 1.00

Usage

film-borders --image ~/Downloads/testscan.jpg --width 2000 --height 1500 --border 10 --rotate 90

For a list of options, see

film-borders --help

Linting

cargo clippy --tests --benches --examples --all-features -- -Dclippy::all -Dclippy::pedantic

TODO

  • lint

  • add rendering text

  • consider: where should into be used, where can be passed by reference

  • add single simple benchmark

  • get out the benchmark data as json or so

  • make a performance tracker via github actions

  • add a full suite of integration tests that check against expected output

    • should test: different file formats
    • should test: all border fill modes
    • should test: with single image and multiple images
    • should test: different sets of border configurations
  • use impls where possible

  • inline everything

  • add more benchmarks

  • add documentation

  • add more tests

  • add examples

  • update the website

  • use generic image backend

Done

  • error handling for lib and border
  • implement arithmetic errors for more types
  • make the errors more nuanced, e.g. from what operation they stem from
  • add backtraces to all error types
  • make debug statements console log when on wasm target
  • add builder for image such that path can be set more easily
  • crop sides should really only be used for the user right?
  • subimage rect could also directly return a mutable sub image using crop?
  • consider: where should image rect be used
  • make all ops checked
  • implement scale border mode (not sophisticated)
  • split the types into multiple files
  • crop to fit should return rect?
  • write a clamp trait
  • lint
  • remove the apply subcommand
  • make border optional
  • allow custom border images (cli, lib and web)
  • make nice ui components
  • custom background color
Commit count: 154

cargo fmt