Home

Awesome

stumpy_gif

Interface

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

GIF image with an animated color gradient GIF image with an animated color gradient GIF image with an animated color gradient

(See examples/ for more examples)

Color Quantization Methods

References

Contributors

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore -->
<img src="https://avatars1.githubusercontent.com/u/2060269?v=4" width="100px;"/><br /><sub><b>Leon</b></sub><br /><img src="https://avatars1.githubusercontent.com/u/26842759?v=4" width="100px;"/><br /><sub><b>Sam</b></sub><br /><img src="https://avatars2.githubusercontent.com/u/11375246?v=4" width="100px;"/><br /><sub><b>Stepan Melnikov</b></sub><br />💻<img src="https://avatars1.githubusercontent.com/u/1196822?v=4" width="100px;"/><br /><sub><b>Dmitry Bochkarev</b></sub><br />💻
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the all-contributors specification. Contributions of any kind welcome!