Popularity
5.2
Declining
Activity
0.0
Stable
18
4
3

Programming language: Crystal
License: MIT License
Tags: Misc    
Latest version: v0.2.1

stumpy_gif alternatives and similar shards

Based on the "Misc" category.
Alternatively, view stumpy_gif alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of stumpy_gif or a related project?

Add another 'Misc' Shard

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_frames is in 1/100 of a second
  • Canvas and RGBA from 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

[GIF image with an animated color gradient](examples/rainbow_websafe.gif) [GIF image with an animated color gradient](examples/rainbow_median_split.gif) [GIF image with an animated color gradient](examples/rainbow_neuquant.gif)

(See examples/ for more examples)

Color Quantization Methods

  • Use Websafe colors
  • Median Split
  • NeuQuant

References

Contributors

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore --> | Leon | Sam | Stepan Melnikov๐Ÿ’ป | Dmitry Bochkarev๐Ÿ’ป | | :---: | :---: | :---: | :---: | <!-- ALL-CONTRIBUTORS-LIST:END -->

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