{"id":13692060,"url":"https://github.com/stumpycr/stumpy_gif","last_synced_at":"2025-07-26T12:10:31.405Z","repository":{"id":67933320,"uuid":"68875150","full_name":"stumpycr/stumpy_gif","owner":"stumpycr","description":"Write GIF images in pure Crystal","archived":false,"fork":false,"pushed_at":"2019-10-10T10:23:07.000Z","size":112,"stargazers_count":19,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-13T14:41:08.499Z","etag":null,"topics":["crystal","gif","image-processing"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/stumpycr.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-22T02:07:04.000Z","updated_at":"2024-06-28T18:10:55.000Z","dependencies_parsed_at":"2024-01-14T19:13:34.068Z","dependency_job_id":"57503378-a84c-4d2e-983f-1539d01f9c78","html_url":"https://github.com/stumpycr/stumpy_gif","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/stumpycr/stumpy_gif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stumpycr%2Fstumpy_gif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stumpycr%2Fstumpy_gif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stumpycr%2Fstumpy_gif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stumpycr%2Fstumpy_gif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stumpycr","download_url":"https://codeload.github.com/stumpycr/stumpy_gif/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stumpycr%2Fstumpy_gif/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267163749,"owners_count":24045707,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["crystal","gif","image-processing"],"created_at":"2024-08-02T17:00:53.160Z","updated_at":"2025-07-26T12:10:31.381Z","avatar_url":"https://github.com/stumpycr.png","language":"Crystal","funding_links":[],"categories":["Image processing"],"sub_categories":[],"readme":"# stumpy_gif\n\n## Interface\n\n* `StumpyGIF.write(frames : Array(Canvas), path_or_io, delay_between_frames = 10)`\n  saves a list of frames (canvasses) as a GIF image file,\n  `delay_between_frames` is in 1/100 of a second\n* `Canvas` and `RGBA` from [stumpy_core](https://github.com/stumpycr/stumpy_core)\n\n## Usage\n\n### Writing\n\n``` crystal\nrequire \"stumpy_gif\"\ninclude StumpyGIF\n\nframes = [] of Canvas\n\n(0..5).each do |z|\n  canvas = Canvas.new(256, 256)\n\n  (0..255).each do |x|\n    (0..255).each do |y|\n      color = RGBA.from_rgb_n([x, y, z * 51], 8)\n      canvas[x, y] = color\n    end\n  end\n\n  frames \u003c\u003c canvas\nend\n\nStumpyGIF.write(frames, \"rainbow.gif\")\n```\n\nLeft to right: Websafe, median split, NeuQuant\n\n![GIF image with an animated color gradient](examples/rainbow_websafe.gif)\n![GIF image with an animated color gradient](examples/rainbow_median_split.gif)\n![GIF image with an animated color gradient](examples/rainbow_neuquant.gif)\n\n(See `examples/` for more examples)\n\n## Color Quantization Methods\n\n* Use Websafe colors\n* Median Split\n* NeuQuant\n\n## References\n\n* [Kohonen Neural Networks for Optimal Colour Quantization](http://members.ozemail.com.au/~dekker/NeuQuant.pdf)\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n| [\u003cimg src=\"https://avatars1.githubusercontent.com/u/2060269?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLeon\u003c/b\u003e\u003c/sub\u003e](http://leonrische.me)\u003cbr /\u003e | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/26842759?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSam\u003c/b\u003e\u003c/sub\u003e](https://github.com/Demonstrandum)\u003cbr /\u003e | [\u003cimg src=\"https://avatars2.githubusercontent.com/u/11375246?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStepan Melnikov\u003c/b\u003e\u003c/sub\u003e](https://github.com/unn4m3d)\u003cbr /\u003e[💻](https://github.com/stumpycr/stumpy_gif/commits?author=unn4m3d \"Code\") | [\u003cimg src=\"https://avatars1.githubusercontent.com/u/1196822?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDmitry Bochkarev\u003c/b\u003e\u003c/sub\u003e](https://github.com/DmitryBochkarev)\u003cbr /\u003e[💻](https://github.com/stumpycr/stumpy_gif/commits?author=DmitryBochkarev \"Code\") |\n| :---: | :---: | :---: | :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstumpycr%2Fstumpy_gif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstumpycr%2Fstumpy_gif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstumpycr%2Fstumpy_gif/lists"}