Colors, images and gifs: bring on the fun with Go!
summary
Shows concrete Go code that builds images, layers and GIFs using almost only the standard library: creating an image.Rectangle, allocating an image.RGBA, setting pixels in nested loops to make gradients, chessboards and trig patterns, mapping byte matrices (Advent of Code cave, forests) to colors, parsing GitHub contribution HTML into a palette-based grid, composing with draw.Draw, rendering text with freetype, producing animated gif.GIF frames with image.Paletted and delays — all examples compile and export viewable PNG/GIF files.
AI-written summary · about
chapters (11)
- 0:00Introduction and fun with Go
- 3:24Four steps to create images
- 7:00Turning inputs into images
- 10:55Real-world GitHub contribution table
- 13:02Drawing layers and compositions
- 16:11Creating banners with layers
- 17:39ASCII art on images
- 19:06Creating GIFs in Go
- 21:55Advanced GIF ideas
- 22:38Closing and call to action
- 23:20Q&A session
