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
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
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
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
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
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).
Cheers guys!







