naps62

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

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

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 :slight_smile:
I now changed this to AGPL as well, to prevent any confusions about licensing

hauleth

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.

Where Next?

Popular in Libraries Top

OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 13487 106
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
Qqwy
While not as prevalent as in imperative languages, arrays (collections with efficient random element access) are still very useful in Eli...
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New
mplatts
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components. We also have a boi...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New

Sub Categories:

We're in Beta

About us Mission Statement