{"id":15705022,"url":"https://github.com/adamcooke/lizard","last_synced_at":"2025-05-12T15:22:36.207Z","repository":{"id":54413295,"uuid":"84577518","full_name":"adamcooke/lizard","owner":"adamcooke","description":"🏞 Very simple ImageMagick interface for Ruby","archived":false,"fork":false,"pushed_at":"2021-02-19T13:24:09.000Z","size":7991,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T15:22:16.993Z","etag":null,"topics":["imagemagick","ruby","wrapper"],"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/adamcooke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T16:10:07.000Z","updated_at":"2023-02-15T06:52:17.000Z","dependencies_parsed_at":"2022-08-13T14:51:05.445Z","dependency_job_id":null,"html_url":"https://github.com/adamcooke/lizard","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/adamcooke%2Flizard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcooke%2Flizard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcooke%2Flizard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcooke%2Flizard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamcooke","download_url":"https://codeload.github.com/adamcooke/lizard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763995,"owners_count":21960491,"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":["imagemagick","ruby","wrapper"],"created_at":"2024-10-03T20:14:35.416Z","updated_at":"2025-05-12T15:22:36.144Z","avatar_url":"https://github.com/adamcooke.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lizard - a simple interface to ImageMagick CLI\n\nLizard is a very simple library that sits atop of a the `convert` and `identify` ImageMagick commands. It's not the fastest image processor in the world but it does it's job. It's job is:\n\n* Reliably identify if a file is an image or not\n* Get image information from an image - size, resolution, etc...\n* Resize an image to any other size\n* Identify the colors in an image and return an array of them\n\n## Installation\n\n```ruby\ngem 'lizard', '~\u003e 1.0'\n```\n\n## Usage\n\n```ruby\nimage = Lizard::Image.new(image_data)\nimage.type        #=\u003e \"JPEG\"\nimage.width       #=\u003e 200\nimage.height      #=\u003e 400\n\n# Resize the image\nresized_image = image.resize(200, 200)\nresized_image = image.resize(200, 200, :ignore_aspect_ratio)\nresized_image = image.resize(200, 200, :fill)\n\n# Crop the image\ncropped_image = image.crop(100, 50)\n\n# Get the histogram\nimage.histogram.colors                    # =\u003e An array of Lizard::Colors\nimage.histogram.colors.first.red          # 23\nimage.histogram.colors.first.green        # 122\nimage.histogram.colors.first.blue         # 200\n\n# Identify if some data is an image or not\nLizard::Image.is_image?(image_data)       #=\u003e true/false\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamcooke%2Flizard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamcooke%2Flizard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamcooke%2Flizard/lists"}