{"id":19474626,"url":"https://github.com/tomasc/dragonfly_libvips","last_synced_at":"2025-04-25T12:32:00.863Z","repository":{"id":46710944,"uuid":"66031856","full_name":"tomasc/dragonfly_libvips","owner":"tomasc","description":"Dragonfly analysers and processors for libvips image processing library.","archived":false,"fork":false,"pushed_at":"2023-02-13T21:57:50.000Z","size":1787,"stargazers_count":13,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T20:16:34.025Z","etag":null,"topics":["dragonfly","libvips"],"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/tomasc.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":"2016-08-18T21:27:34.000Z","updated_at":"2022-07-29T10:54:06.000Z","dependencies_parsed_at":"2024-11-10T19:26:01.840Z","dependency_job_id":"7c0fb2db-c2a9-4f91-9f9e-de13f8809a0e","html_url":"https://github.com/tomasc/dragonfly_libvips","commit_stats":{"total_commits":142,"total_committers":6,"mean_commits":"23.666666666666668","dds":0.2605633802816901,"last_synced_commit":"a36cdb912a874ce74a67600fecbff79f2aa9c294"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fdragonfly_libvips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fdragonfly_libvips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fdragonfly_libvips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasc%2Fdragonfly_libvips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasc","download_url":"https://codeload.github.com/tomasc/dragonfly_libvips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250817824,"owners_count":21492230,"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":["dragonfly","libvips"],"created_at":"2024-11-10T19:25:53.783Z","updated_at":"2025-04-25T12:31:56.222Z","avatar_url":"https://github.com/tomasc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dragonfly libvips\n\n[![Build Status](https://travis-ci.org/tomasc/dragonfly_libvips.svg)](https://travis-ci.org/tomasc/dragonfly_libvips) [![Gem Version](https://badge.fury.io/rb/dragonfly_libvips.svg)](http://badge.fury.io/rb/dragonfly_libvips) [![Coverage Status](https://img.shields.io/coveralls/tomasc/dragonfly_libvips.svg)](https://coveralls.io/r/tomasc/dragonfly_libvips)\n\nDragonfly analysers and processors for [libvips](https://github.com/libvips/libvips) image processing library\n\nFrom the libvips README:\n\n\u003e libvips is a 2D image processing library. Compared to similar libraries, [libvips runs quickly and uses little memory](https://github.com/libvips/libvips/wiki/Speed-and-memory-use). libvips is licensed under the LGPL 2.1+.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'dragonfly_libvips'\n```\n\nAnd then execute:\n\n```\n$ bundle\n```\n\nOr install it yourself as:\n\n```\n$ gem install dragonfly_libvips\n```\n\n### libvips\n\nIf you run into trouble installing `libvips` with Ruby introspection on Linux, follow the [build steps here](https://github.com/tomasc/dragonfly_libvips/blob/master/.travis.yml). Please note the importance of `gobject-introspection` and `libgirepository1.0-dev` plus the `export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0/` and `ldconfig`.\n\n## Dependencies\n\nThe [vips](http://www.vips.ecs.soton.ac.uk/index.php?title=Supported) library and its [dependencies](https://github.com/libvips/libvips#dependencies).\n\n## Usage\n\nConfigure your app the usual way:\n\n```ruby\nDragonfly.app.configure do\n  plugin :libvips\nend\n```\n\n## Supported Formats\n\nList of supported formats (based on your build and version of the `libvips` library) is available as:\n\n```ruby\nDragonflyLibvips::SUPPORTED_FORMATS # =\u003e [\"csv\", \"dz\", \"gif\", …]\nDragonflyLibvips::SUPPORTED_OUTPUT_FORMATS # =\u003e [\"csv\", \"dz\", \"gif\", …]\n```\n\n## Processors\n\n### Thumb\n\nCreate a thumbnail by resizing/cropping\n\n```ruby\nimage.thumb('40x30')\n```\n\nBelow are some examples of geometry strings for `thumb`:\n\n```ruby\n'400x300' # resize, maintain aspect ratio\n'400x' # resize width, maintain aspect ratio\n'x300' # resize height, maintain aspect ratio\n'400x300\u003c' # resize only if the image is smaller than this\n'400x300\u003e' # resize only if the image is larger than this\n```\n\n### Encode\n\nChange the encoding with\n\n```ruby\nimage.encode('jpg')\n```\n\n### Extract Area\n\nExtract an area from an image.\n\n```ruby\nimage.extract_area(x, y, width, height)\n```\n\n### Rotate\n\nRotate a number of degrees with\n\n```ruby\nimage.rotate(90)\n```\n\n### Options\n\nAll processors support `input_options` and `output_options` for passing additional options to vips. For example:\n\n```ruby\nimage.encode('jpg', output_options: { Q: 50 })\nimage.encode('jpg', output_options: { interlace: true }) # use interlace to generate a progressive jpg\npdf.encode('jpg', input_options: { page: 0, dpi: 600 })\n```\n\nDefaults:\n\n```ruby\ninput_options: { access: :sequential }\noutput_options: { profile: … } # embeds 'sRGB_v4_ICC_preference.icc' profile included with this gem\n```\n\n## Analysers\n\nThe following methods are provided\n\n```ruby\nimage.width # =\u003e 280\nimage.height # =\u003e 355\nimage.xres # =\u003e 72.0\nimage.yres # =\u003e 72.0\nimage.progressive # =\u003e true\nimage.aspect_ratio # =\u003e 0.788732394366197\nimage.portrait? # =\u003e true\nimage.landscape? # =\u003e false\nimage.format # =\u003e 'png'\nimage.image? # =\u003e true\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at \u003chttps://github.com/tomasc/dragonfly_libvips\u003e.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasc%2Fdragonfly_libvips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasc%2Fdragonfly_libvips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasc%2Fdragonfly_libvips/lists"}