{"id":21535734,"url":"https://github.com/ksk001100/pixel_matcher","last_synced_at":"2025-04-10T01:50:59.283Z","repository":{"id":36912544,"uuid":"230904146","full_name":"ksk001100/pixel_matcher","owner":"ksk001100","description":"Library to compare images and generate difference image files","archived":false,"fork":false,"pushed_at":"2022-10-20T05:08:02.000Z","size":4477,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T04:41:54.935Z","etag":null,"topics":["diff-image","image-processing","imagemagick","rmagick","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/ksk001100.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-30T11:30:51.000Z","updated_at":"2020-02-06T06:34:54.000Z","dependencies_parsed_at":"2022-08-21T00:50:49.311Z","dependency_job_id":null,"html_url":"https://github.com/ksk001100/pixel_matcher","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksk001100%2Fpixel_matcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksk001100%2Fpixel_matcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksk001100%2Fpixel_matcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksk001100%2Fpixel_matcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksk001100","download_url":"https://codeload.github.com/ksk001100/pixel_matcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142864,"owners_count":21054667,"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":["diff-image","image-processing","imagemagick","rmagick","ruby"],"created_at":"2024-11-24T03:16:10.477Z","updated_at":"2025-04-10T01:50:59.254Z","avatar_url":"https://github.com/ksk001100.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PixelMatcher\n![](https://ruby-gem-downloads-badge.herokuapp.com/pixel_matcher)\n[![Gem Version](https://badge.fury.io/rb/pixel_matcher.svg)](https://badge.fury.io/rb/pixel_matcher)\n[![Build Status](https://travis-ci.org/ksk001100/pixel_matcher.svg?branch=master)](https://travis-ci.org/ksk001100/pixel_matcher)\n![](https://img.shields.io/github/issues/ksk001100/pixel_matcher.svg)\n![](https://img.shields.io/github/forks/ksk001100/pixel_matcher.svg)\n![](https://img.shields.io/github/license/ksk001100/pixel_matcher.svg)\n\n\nLibrary to compare images and generate difference image files\n\n![](images/generate.png)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'pixel_matcher'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install pixel_matcher\n\n## Usage\n\n### Library\n```ruby\nrequire 'pixel_matcher'\n\n# from rmagick image\nrequire 'rmagick'\ndiff = PixelMatcher::DiffImage.new(Magick::Image.read('img1.png').first, Magick::Image.read('img2.png').first)\ndiff.export('diff.png') # or mode: :only\ndiff.export('gray_scale.png', mode: :gray_scale)\ndiff.export('compare.png', mode: :compare)\n\n# from file path\ndiff = PixelMatcher::DiffImage.from_path('img1.png', 'img2.png')\ndiff.export('diff.png') # or mode: :only\ndiff.export('gray_scale.png', mode: :gray_scale)\ndiff.export('compare.png', mode: :compare)\n\n# from blob\ndiff = PixelMatcher::DiffImage.from_blob(File.read('img1.png'), File.read('img2.png'))\ndiff.export('diff.png') # or mode: :only\ndiff.export('gray_scale.png', mode: :gray_scale)\ndiff.export('compare.png', mode: :compare)\n```\n\n### CLI tool\n```bash\n$ pixel_matcher img1.png img2.png diff.png\n```\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` 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 https://github.com/ksk001100/pixel_matcher. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the PixelMatcher project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ksk001100/pixel_matcher/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksk001100%2Fpixel_matcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksk001100%2Fpixel_matcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksk001100%2Fpixel_matcher/lists"}