stumpy_gif
Version, currently 0.2.13 versions
- 0.2.1latestOct 10, 2019
- 0.2.0not indexedOct 10, 2019
- 0.1.1not indexedOct 10, 2019
github.com/stumpycr/stumpy_gif
Write GIF images in pure Crystal
19 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
stumpy_gif:
github: stumpycr/stumpy_gif
version: ~> 0.2.1Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- Leon Rische
Dependencies
Runtime Dependencies
- stumpy_core~> 1.8git: https://github.com/stumpycr/stumpy_core.git
Development Dependencies
- minitest~> 0.3.1git: https://github.com/ysbaddaden/minitest.cr.gitdev
README
stumpy_gif
Interface
StumpyGIF.write(frames : Array(Canvas), path_or_io, delay_between_frames = 10)saves a list of frames (canvasses) as a GIF image file,delay_between_framesis in 1/100 of a secondCanvasandRGBAfrom stumpy_core
Usage
Writing
require "stumpy_gif"
include StumpyGIF
frames = [] of Canvas
(0..5).each do |z|
canvas = Canvas.new(256, 256)
(0..255).each do |x|
(0..255).each do |y|
color = RGBA.from_rgb_n([x, y, z * 51], 8)
canvas[x, y] = color
end
end
frames << canvas
end
StumpyGIF.write(frames, "rainbow.gif")
Left to right: Websafe, median split, NeuQuant

(See examples/ for more examples)
Color Quantization Methods
- Use Websafe colors
- Median Split
- NeuQuant
References
Contributors
Thanks goes to these wonderful people (emoji key):
| Leon | Sam | Stepan Melnikov💻 | Dmitry Bochkarev💻 |
|---|---|---|---|
This project follows the all-contributors specification. Contributions of any kind welcome!
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.1- Tagged
- Oct 10, 2019
- Commit
64eec3729f75- Indexed
- yes
Dependents
Repository
github.com/stumpycr/stumpy_gif
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 24, 2026
- Synced
- Sep 24, 2026
- Versions
- 3