{"id":13747571,"url":"https://github.com/EricR/image_sorcery","last_synced_at":"2025-05-09T09:30:24.973Z","repository":{"id":3545602,"uuid":"4605908","full_name":"EricR/image_sorcery","owner":"EricR","description":"A ruby Image/Graphics Magick library. Note: This project is no longer maintained.","archived":false,"fork":false,"pushed_at":"2013-01-21T21:17:51.000Z","size":2276,"stargazers_count":280,"open_issues_count":3,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-26T03:22:39.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EricR.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-09T08:36:32.000Z","updated_at":"2024-12-31T15:34:16.000Z","dependencies_parsed_at":"2022-08-20T11:30:37.680Z","dependency_job_id":null,"html_url":"https://github.com/EricR/image_sorcery","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/EricR%2Fimage_sorcery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricR%2Fimage_sorcery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricR%2Fimage_sorcery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EricR%2Fimage_sorcery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EricR","download_url":"https://codeload.github.com/EricR/image_sorcery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253226229,"owners_count":21874295,"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":[],"created_at":"2024-08-03T06:01:33.861Z","updated_at":"2025-05-09T09:30:24.652Z","avatar_url":"https://github.com/EricR.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"Image Sorcery allows you to leverage all three of ImageMagick's command line tools, [mogrify](http://www.imagemagick.org/script/mogrify.php), [convert](http://www.imagemagick.org/script/convert.php), and [identify](http://www.imagemagick.org/script/identify.php), for maximum magickal power and minimum memory consumption! It even lets you use GraphicsMagick, too, if that's your thing.\n\n[![Gem Version](https://badge.fury.io/rb/image_sorcery.png)](http://badge.fury.io/rb/image_sorcery)\n[![Build Status](https://travis-ci.org/EricR/image_sorcery.png?branch=master)](https://travis-ci.org/EricR/image_sorcery/)\n\n## Why?\n\nAt [Fol.io](http://fol.io), we needed server-side image processing to work well and bend to our will. I wrote this because the ImageMagick libraries we tried suffered from at least one of two problems:\n\n* Large memory consumption/leaking\n* Didn't expose the entire ImageMagick API\n\nImageSorcery doesn't try to be anything more than a wrapper that exposes the full ImageMagick and GraphicsMagick APIs. This makes it small and powerful, eliminating the above problems.\n\n## Installation\n\n    gem install image_sorcery\n\n## Code Examples\n```ruby\nimage = ImageSorcery.new(\"image.png\")\nimage.identify # =\u003e \"image.png PNG 500x500 500x500+0+0 8-bit DirectClass 236KB 0.010u 0:00.010\\n\"\nimage.manipulate!(scale: \"50%\") # =\u003e true\nimage.dimensions # =\u003e { x: 250, y: 250 }\nimage.convert(\"thumbnail.jpg\", quality: 80, crop: \"100x100\u003e\") # =\u003e true\n```\n\n```ruby\nimage = ImageSorcery.new(\"multi-page.pdf\")\nimage.filename_changed? # =\u003e false\nimage.manipulate!(format: \"png\", layer: 0) # =\u003e true\nimage.filename_changed? # =\u003e true\nimage.file # =\u003e \"multi-page.png\"\n```\n\n```ruby\nimage = ImageSorcery.new(\"multi-page.pdf\")\nimage.manipulate!(format: \"png\") # =\u003e true\nimage.filename_changed? # =\u003e true\n\n# on ImageMagick it returns all layers as a single file\nimage.file # =\u003e \"multi-page-*.png\"\n\n# on GrapicksMagick it returns only the fist layer\nimage.file # =\u003e \"multi-page.png\"\n```\n\n# Using GraphicsMagick\nAssuming you have GraphicsMagick installed on your box:\n\n```ruby\nimage = ImageSorcery.gm(\"image.png\")\n# use as normal\n```\n\n## Todo\n\n* Some more unit tests\n* A few more convenience methods (like \"dimensions\").\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEricR%2Fimage_sorcery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEricR%2Fimage_sorcery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEricR%2Fimage_sorcery/lists"}