dariju

dariju

Erlang or Elixir wrappers for libvips

I need a wrapper for LibVips. I have found 2 ones

Those are unpopular - 11 and 14 downloads.

Are there other ones, in Erlang or Elixir, that are used by most people and are recommended?

Most Liked

akash-akya

akash-akya

Hi @KiKi,

Have you tried vix? (disclaimer: I’m the author)

vix tries to be complete binding for vips, supporting almost all operations and options. If your use case has complex image manipulation pipelines then you can do that efficiently with vix. afaik other libraries does not support all operations or pipelines. You can think of vix as an elixir binding library, which aims to be something like ruby-vips.

kip

kip

ex_cldr Core Team

Of the two you found, none are a lipvips wrapper. https://hex.pm/packages/vips wraps the command line version. The other is not libvips related. Like you, I’d like to see a NIF-based libvips wrapper but my NIF-fu is weak.

christianjgreen

christianjgreen

So I started to dig into the native code to see what I was doing wrong, because when it comes to concurrency, it’s usually my fault. In this case the issue was garbage collections was done globally and not on a per BEAM thread basis. I think I might pick this project back up if there’s any interest in it.

christianjgreen

christianjgreen

By a “pipeline” do you mean something like the lines of:

"some_file.png"
|> File.open!()
|> Libvips.new()
|> Libvips.smartcrop()
|> Libvips.to_buffer()

Libvips operations in this instance would pass a “ref” back and forth to avoid unnecessarily crossing the NIF bridge with the image data.

jesselatham

jesselatham

Hi guys,

A little late to the game here but I’d also love to see some work done around vips in support of Elixir after having used it with Rails projects at the last company I was with.

I had enjoyed its performance and ease of use over imagemagick and rmagick along when using the https://github.com/libvips/ruby-vips project. It would be great to offer this to the community and I’m willing to help out in any way I can (testing, documentation, picking up C along the way and so on).

And pipelining would be awesome to have as Kip has confirmed would be awesome (at least to get to with future versions).

@christianjgreen / @kip

Cheers guys!

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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
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
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement