All Projects → libvips → Ruby Vips

libvips / Ruby Vips

Licence: mit
Ruby extension for the libvips image processing library.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Ruby Vips

Skrop
Image transformation service using libvips, based on Skipper.
Stars: ✭ 71 (-88.87%)
Mutual labels:  image-processing, libvips
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+855.17%)
Mutual labels:  image-processing, libvips
Dockerfile Libvips
🌄 All libvips dependencies & libvips built from source
Stars: ✭ 26 (-95.92%)
Mutual labels:  image-processing, libvips
Images
Source code of images.weserv.nl, to be used on your own server(s).
Stars: ✭ 798 (+25.08%)
Mutual labels:  image-processing, libvips
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+3212.07%)
Mutual labels:  image-processing, libvips
Net Vips
.NET binding for libvips
Stars: ✭ 173 (-72.88%)
Mutual labels:  image-processing, libvips
Dali
An image processor service
Stars: ✭ 119 (-81.35%)
Mutual labels:  image-processing, libvips
Govips
A lightning fast image processing and resizing library for Go
Stars: ✭ 442 (-30.72%)
Mutual labels:  image-processing, libvips
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+543.73%)
Mutual labels:  image-processing, libvips
Retinal
🏙 Retinal is a Serverless AWS Lambda service for resizing images on-demand or event-triggered
Stars: ✭ 208 (-67.4%)
Mutual labels:  image-processing, libvips
Mort
Storage and image processing server written in Go
Stars: ✭ 420 (-34.17%)
Mutual labels:  image-processing, libvips
Imgproxy
Fast and secure standalone server for resizing and converting remote images
Stars: ✭ 5,688 (+791.54%)
Mutual labels:  image-processing, libvips
Jquery Cropper
A jQuery plugin wrapper for Cropper.js.
Stars: ✭ 516 (-19.12%)
Mutual labels:  image-processing
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (-8.78%)
Mutual labels:  image-processing
Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (-19.28%)
Mutual labels:  image-processing
Imagesharp
📷 A modern, cross-platform, 2D Graphics library for .NET
Stars: ✭ 5,186 (+712.85%)
Mutual labels:  image-processing
Image processing
High-level image processing wrapper for libvips and ImageMagick/GraphicsMagick
Stars: ✭ 600 (-5.96%)
Mutual labels:  image-processing
Color Thief Php
Grabs the dominant color or a representative color palette from an image. Uses PHP and GD, Imagick or Gmagick.
Stars: ✭ 564 (-11.6%)
Mutual labels:  image-processing
Pycnn
Image Processing with Cellular Neural Networks in Python
Stars: ✭ 509 (-20.22%)
Mutual labels:  image-processing
Qupath
QuPath - Bioimage analysis & digital pathology
Stars: ✭ 503 (-21.16%)
Mutual labels:  image-processing

ruby-vips

Gem Version Test

This gem is a Ruby binding for the libvips image processing library.

Programs that use ruby-vips don't manipulate images directly, instead they create pipelines of image processing operations building on a source image. When the end of the pipe is connected to a destination, the whole pipeline executes at once, streaming the image in parallel from source to destination a section at a time. Because ruby-vips is parallel, it's quick, and because it doesn't need to keep entire images in memory, it's light.

Requirements

Install

It's just:

$ gem install ruby-vips

or include it in Gemfile:

gem "ruby-vips"

On Windows, you'll need to set the RUBY_DLL_PATH environment variable to point to the libvips bin directory.

Example

require "vips"

im = Vips::Image.new_from_file filename

# put im at position (100, 100) in a 3000 x 3000 pixel image, 
# make the other pixels in the image by mirroring im up / down / 
# left / right, see
# https://libvips.github.io/libvips/API/current/libvips-conversion.html#vips-embed
im = im.embed 100, 100, 3000, 3000, extend: :mirror

# multiply the green (middle) band by 2, leave the other two alone
im *= [1, 2, 1]

# make an image from an array constant, convolve with it
mask = Vips::Image.new_from_array [
    [-1, -1, -1],
    [-1, 16, -1],
    [-1, -1, -1]], 8
im = im.conv mask, precision: :integer

# finally, write the result back to a file on disk
im.write_to_file output_filename

The Vips section in the API docs has a tutorial introduction with examples.

ruby-vips has API documentation. The libvips reference manual has a complete explanation of every method.

The example/ directory has some simple example programs.

Benchmarks

The benchmark at vips-benchmarks loads a large image, crops, shrinks, sharpens and saves again, and repeats 10 times.

real time in seconds, fastest of five runs
benchmark       tiff    jpeg
ruby-vips.rb	0.85	0.78	
image-magick	2.03	2.44	
rmagick.rb	3.87	3.89	

peak memory use in kb
benchmark	peak RES
ruby-vips.rb	43864
rmagick.rb	788768

See also benchmarks at the official libvips website.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].