Giter Site home page Giter Site logo

romnn / film-borders Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 35.09 MB

add 35mm / 120mm film borders to your photos :)

Home Page: https://romnn.github.io/film-borders/

License: MIT License

Rust 80.89% Python 1.10% JavaScript 1.07% HTML 1.00% TypeScript 13.83% Sass 1.78% Dockerfile 0.32%
film image rust borders film-borders wasm cli analog image-manipulation kodak

film-borders's Introduction

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

film-borders's People

Contributors

romnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.