{"id":13484160,"url":"https://github.com/libvips/ruby-vips","last_synced_at":"2025-05-13T18:07:35.655Z","repository":{"id":39364006,"uuid":"2556649","full_name":"libvips/ruby-vips","owner":"libvips","description":"Ruby extension for the libvips image processing library.","archived":false,"fork":false,"pushed_at":"2025-02-06T16:35:43.000Z","size":9937,"stargazers_count":846,"open_issues_count":17,"forks_count":60,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-05-03T08:36:10.228Z","etag":null,"topics":["image-processing","libvips","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libvips.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-10-11T16:45:42.000Z","updated_at":"2025-04-26T15:36:32.000Z","dependencies_parsed_at":"2022-07-11T21:51:09.834Z","dependency_job_id":"2b644cd5-8e83-42db-a377-1a7d381b3006","html_url":"https://github.com/libvips/ruby-vips","commit_stats":{"total_commits":609,"total_committers":31,"mean_commits":19.64516129032258,"dds":"0.29885057471264365","last_synced_commit":"b773f31387e69cf106fc1e855f53a923149a6c1e"},"previous_names":["jcupitt/ruby-vips"],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libvips%2Fruby-vips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libvips%2Fruby-vips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libvips%2Fruby-vips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libvips%2Fruby-vips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libvips","download_url":"https://codeload.github.com/libvips/ruby-vips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252264484,"owners_count":21720520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","libvips","ruby"],"created_at":"2024-07-31T17:01:20.079Z","updated_at":"2025-05-13T18:07:35.626Z","avatar_url":"https://github.com/libvips.png","language":"Ruby","funding_links":[],"categories":["Image Processing","Ruby"],"sub_categories":[],"readme":"# ruby-vips\n\n[![Gem Version](https://badge.fury.io/rb/ruby-vips.svg)](https://badge.fury.io/rb/ruby-vips)\n[![Test](https://github.com/libvips/ruby-vips/workflows/Test/badge.svg)](https://github.com/libvips/ruby-vips/actions?query=workflow%3ATest)\n\nThis gem is a Ruby binding for the [libvips image processing\nlibrary](https://libvips.github.io/libvips). It has been tested on\nLinux, macOS and Windows, and with ruby 2, ruby 3 and jruby. It uses\n[ruby-ffi](https://github.com/ffi/ffi) to call functions in the libvips\nlibrary.\n\nlibvips is a [demand-driven, horizontally\nthreaded](https://github.com/libvips/libvips/wiki/Why-is-libvips-quick)\nimage processing library. Compared to similar\nlibraries, [libvips runs quickly and uses little\nmemory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).\nlibvips is licensed under the [LGPL\n2.1+](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).\n\n## Install on linux and macOS\n\nInstall the libvips binary with your package manager (eg. `apt install\nlibvips42` or perhaps `brew install vips`, see the [libvips install\ninstructions](https://libvips.github.io/libvips/install.html)) then install\nthis gem with:\n\n```\ngem install ruby-vips\n```\n\nOr include `gem \"ruby-vips\"` in your gemfile.\n\n## Install on Windows\n\nThe gemspec will pull in the msys libvips for you, so all you need is:\n\n```\ngem install ruby-vips\n```\n\nOr include `gem \"ruby-vips\"` in your gemfile.\n\nTested with the ruby and msys from choco, but others may work.\n\n## Example\n\n```ruby\nrequire \"vips\"\n\nim = Vips::Image.new_from_file filename\n\n# put im at position (100, 100) in a 3000 x 3000 pixel image, \n# make the other pixels in the image by mirroring im up / down / \n# left / right, see\n# https://libvips.github.io/libvips/API/current/libvips-conversion.html#vips-embed\nim = im.embed 100, 100, 3000, 3000, extend: :mirror\n\n# multiply the green (middle) band by 2, leave the other two alone\nim *= [1, 2, 1]\n\n# make an image from an array constant, convolve with it\nmask = Vips::Image.new_from_array [\n    [-1, -1, -1],\n    [-1, 16, -1],\n    [-1, -1, -1]], 8\nim = im.conv mask, precision: :integer\n\n# finally, write the result back to a file on disk\nim.write_to_file output_filename\n```\n\n## Documentation\n\nThere are [full API docs for ruby-vips on\nrubydoc](https://www.rubydoc.info/gems/ruby-vips). This sometimes has issues\nupdating, so we have a [copy on the gh-pages for this site as\nwell](http://libvips.github.io/ruby-vips), which\nshould always work.\n\nSee the `Vips` section in the docs for a [tutorial introduction with\nexamples](https://www.rubydoc.info/gems/ruby-vips/Vips).\n\nThe [libvips reference manual](https://libvips.github.io/libvips/API/current/)\nhas a complete explanation of every method.\n\nThe [`example/`](https://github.com/libvips/ruby-vips/tree/master/example)\ndirectory has some simple example programs.\n\n## Benchmarks\n\nThe benchmark at [vips-benchmarks](https://github.com/jcupitt/vips-benchmarks)\nloads a large image, crops, shrinks, sharpens and saves again, and repeats\n10 times.\n\n```text\nreal time in seconds, fastest of five runs\nbenchmark       tiff    jpeg\nruby-vips.rb\t0.85\t0.78\t\nimage-magick\t2.03\t2.44\t\nrmagick.rb\t3.87\t3.89\t\n\npeak memory use in kb\nbenchmark\tpeak RES\nruby-vips.rb\t43864\nrmagick.rb\t788768\n```\n\nSee also [benchmarks at the official libvips\nwebsite](https://github.com/libvips/libvips/wiki/Speed-and-memory-use).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibvips%2Fruby-vips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibvips%2Fruby-vips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibvips%2Fruby-vips/lists"}