_______________ STUMPYPNG/GIF Leon Rische _______________ [2019-07-22 Mon 20:15] Table of Contents _________________ 1. StumpyPNG 2. StumpyGIF 1 StumpyPNG =========== Crystal library for reading and writing png files, with support for Adam7 interlacing and all kinds of color types. Source code on Github: [stumpycr/stumpy_png] ,---- | include StumpyPNG | | canvas = Canvas.new(256, 256) | | (0...255).each do |x| | (0...255).each do |y| | # RGBA.from_rgb_n(values, bit_depth) is an internal helper method | # that creates an RGBA object from a rgb triplet with a given bit depth | color = RGBA.from_rgb_n(x, y, 255, 8) | canvas[x, y] = color | end | end | | StumpyPNG.write(canvas, "rainbow.png") `---- [stumpycr/stumpy_png] 2 StumpyGIF =========== Crystal library for creating (animated) gif files. Source code on Github: [stumpycr/stumpy_gif] [stumpycr/stumpy_gif]