{"id":21740209,"url":"https://github.com/waydotnet/carrierwave-imagesorcery","last_synced_at":"2025-04-13T03:40:32.557Z","repository":{"id":4375090,"uuid":"5511760","full_name":"WaYdotNET/carrierwave-imagesorcery","owner":"WaYdotNET","description":"Additional processing to use ImageSorcery into CarrierWave ","archived":false,"fork":false,"pushed_at":"2016-07-23T13:10:19.000Z","size":188,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T20:51:23.314Z","etag":null,"topics":["carrierwave","imagesorcery","ruby"],"latest_commit_sha":null,"homepage":null,"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/WaYdotNET.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-22T15:59:37.000Z","updated_at":"2017-03-08T13:15:06.000Z","dependencies_parsed_at":"2022-06-29T10:54:38.860Z","dependency_job_id":null,"html_url":"https://github.com/WaYdotNET/carrierwave-imagesorcery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaYdotNET%2Fcarrierwave-imagesorcery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaYdotNET%2Fcarrierwave-imagesorcery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaYdotNET%2Fcarrierwave-imagesorcery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WaYdotNET%2Fcarrierwave-imagesorcery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WaYdotNET","download_url":"https://codeload.github.com/WaYdotNET/carrierwave-imagesorcery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660599,"owners_count":21141323,"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":["carrierwave","imagesorcery","ruby"],"created_at":"2024-11-26T06:12:33.182Z","updated_at":"2025-04-13T03:40:32.527Z","avatar_url":"https://github.com/WaYdotNET.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CarrierWave::ImageSorcery\n\nAdditional processing to use [ImageSorcery](https://github.com/EricR/image_sorcery) into [CarrierWave](https://github.com/jnicklas/carrierwave).\n\n[![Gem Version](https://badge.fury.io/rb/carrierwave-imagesorcery.png)](http://badge.fury.io/rb/image_sorcery)\n[![Build Status](https://travis-ci.org/WaYdotNET/carrierwave-imagesorcery.png)](https://travis-ci.org/WaYdotNET/carrierwave-imagesorcery)\n[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/WaYdotNET/carrierwave-imagesorcery)\n[![Coverage Status](https://coveralls.io/repos/WaYdotNET/carrierwave-imagesorcery/badge.png)](https://coveralls.io/r/WaYdotNET/carrierwave-imagesorcery)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'carrierwave-imagesorcery'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install carrierwave-imagesorcery\n\n## Usage\n\nTo use those, you should include specified module (ImageSorcery) into your uploader and use processors:\n\n```ruby\nclass AvatarUploader \u003c CarrierWave::Uploader::Base\n  include CarrierWave::ImageSorcery\n  # .....\nend\n```\n\n## Method implemented\n\n```ruby\nconvert\ndimensions\nresize_to_limit\nresize_to_fit\nresize_to_fill\nresize_and_pad\n```\n\n## Example\n\n```ruby\nclass Uploader \u003c CarrierWave::Uploader::Base\n  # Image manipulator library:\n  include CarrierWave::ImageSorcery\n\n  process :resize_and_pad =\u003e [900,300,\"#ffeecc\", 'South']\n  process :resize_to_fit =\u003e [1024, 768]\nend\n```\n\n## Example custom method\n\nAn example to implement custom method\n\n```ruby\nclass Uploader \u003c CarrierWave::Uploader::Base\n  include CarrierWave::ImageSorcery\n  process :watermark_text\n\n  def watermark_text(text = \"© #{Time.now.year} - Carlo Bertini [WaYdotNET]\")\n    manipulate! do |img|\n      args  = {\n        font: 'Helvetica', fill: 'white', stroke: '#00770080',\n        gravity: 'South', pointsize: 20, draw: \" text 0,0 \\\"#{text}\\\" \"\n      }\n      img.manipulate! args\n      img\n    end\n  end\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n## Author\n\nWaYdotNET, you can follow me on twitter [@WaYdotNET](http://twitter.com/WaYdotNET) or take a look at my site [waydotnet.com](http://www.waydotnet.com)\n\n## Copyright\n\nCopyright (C) 2013 Carlo Bertini - [@WaYdotNET](http://twitter.com/WaYdotNET)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and\nassociated documentation files (the “Software”), to deal in the Software without restriction, including without\nlimitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,\nand to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaydotnet%2Fcarrierwave-imagesorcery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaydotnet%2Fcarrierwave-imagesorcery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaydotnet%2Fcarrierwave-imagesorcery/lists"}