naps62
Imageflow_ex - FFI bindings to a blazing fast Rust-based processing tool, along with a proper Elixir-style API
I just released the first working version of imageflow_ex, a package that provides bindings and a custom API to imageflow, which is a Rust-based image processing tool
Imageflow itself has incredible benchmarks when comparing to vips & imagemagick
I also took some time to implement a proper Elixir-style API, that makes image processing look very similar to Elixir Streams. One example:
alias Imageflow.Graph
Graph.new()
|> Graph.decode_file(@input_path)
|> Graph.branch(fn graph ->
# 2160px wide image for retina displays graph
|> Graph.constrain(2160, nil)
|> Graph.encode_to_file("desktop@2x.png")
end)
|> Graph.branch(fn graph -> # 1080px wide image for desktop
graph
|> Graph.constrain(1080, nil)
|> Graph.encode_to_file("desktop.png")
end)
|> Graph.branch(fn graph -> # 600px wide image for mobile
graph
|> Graph.constrain(600, nil)
|> Graph.encode_to_file("mobile.png")
end)
|> Graph.run()
Most Liked
hauleth
Just remember that it is AGPL licensed, so most project will not be able to use that library (at least without paying for ImageFlow).
naps62
Yes, I’m aware of that. The use case that led me to find imageflow is a nice fit.
Your comment also made me realise that I forgot to choose a proper license for this, and had published it with the same ISC license that I had when I copy/pasted the mix boilerplate from another project. So thanks for that 
I now changed this to AGPL as well, to prevent any confusions about licensing
hauleth
Yes, there is a lot of projects that use that approach:
- ImageFlow (as mentioned above)
- Qt
- FFTW
- Drone.io
- MySQL
- jOOQ
- Nmap
- MongoDB
The way “how it would work” is simply writing:
This project is licensed as AGPLv3 or ISC (your choice). Beware that the latter requires you to purchase commercial ImageFlow license.
And now you are covered. Anyone who would purchase ImageFlow will be able to use your project in non-AGPL project (as they are able to pick ISC license) and you are complying with AGPLv3 of the ImageFlow.
I am pretty sure that if you will write to the ImageFlow team then they will be keen to help you with licensing questions, and maybe they will also promote it on the official website.








