{"id":20580824,"url":"https://github.com/soffes/icns","last_synced_at":"2025-04-14T19:45:30.121Z","repository":{"id":52314804,"uuid":"133686506","full_name":"soffes/icns","owner":"soffes","description":"Ruby library for extrating images from ICNS files","archived":false,"fork":false,"pushed_at":"2021-04-30T20:28:45.000Z","size":2262,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T08:11:16.985Z","etag":null,"topics":["apple","icns","icon","image","jpeg-2000","linux","macos","png","ruby"],"latest_commit_sha":null,"homepage":"http://rubygems.org/gems/icns","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/soffes.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":"2018-05-16T15:25:43.000Z","updated_at":"2020-03-07T20:06:34.000Z","dependencies_parsed_at":"2022-08-22T15:00:53.388Z","dependency_job_id":null,"html_url":"https://github.com/soffes/icns","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Ficns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Ficns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Ficns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Ficns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soffes","download_url":"https://codeload.github.com/soffes/icns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248950394,"owners_count":21188260,"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":["apple","icns","icon","image","jpeg-2000","linux","macos","png","ruby"],"created_at":"2024-11-16T06:25:39.465Z","updated_at":"2025-04-14T19:45:30.099Z","avatar_url":"https://github.com/soffes.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ICNS\n\n[![Gem Version](https://img.shields.io/gem/v/icns.svg)](http://rubygems.org/gems/icns)\n[![Build Status](https://travis-ci.com/soffes/icns.svg?branch=master)](https://travis-ci.com/soffes/icns)\n\nRuby library for extrating images from [Apple Icon Image format (ICNS)](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) files.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'icns'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install icns\n\n\n## Usage\n\nRead an icon out of an ICNS file:\n\n```ruby\nrequire 'icns'\n\n# Create a reader for an ICNS file\nreader = Icns::Reader.new('/Applications/Preview.app/Contents/Resources/Preview.icns')\n\n# Extract the image data for a given size\ndata = reader.image(size: 1024)\n\n# Write the image data out or do whatever you want with it\nFile.write('Preview.png', data)\n```\n\nAnnoyingly, icons can be either PNGs or JPEG-2000s. The image data will start with `\"\\x89PNG\"` if it is a PNG. You need to always have them in one format or another, I’d recommend using [minimagick](https://github.com/minimagick/minimagick) to convert it.\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\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/soffes/icns.\n\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\n## References\n\nhttps://en.wikipedia.org/wiki/Apple_Icon_Image_format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoffes%2Ficns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoffes%2Ficns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoffes%2Ficns/lists"}