28
loading...
This website collects cookies to deliver better user experience
ImageList
class (a class defined in the RMagick library) to hold each frame of the animationImage
class (also from RMagick)Image
instance to the ImageList
Image
just added should last (this allows us to pause longer on a keyframe compared to the transitional/animation frames)ImageList
instance to a .gif
fileAnimation
class that holds most of the information/logic for the animation as a wholeFrame
class that holds the data for a single image in the animationDot
class that holds the information for a single dot/pixel in an imageAnimation
class. It then resizes all of the input images down to the desired dot matrix size and adds them to an array in the Animation
instance. The next step is to create Frame
instances for each keyframe and all the transitional frames. Then each pixel of each Frame
is used to instantiate a Dot
, which is then used to render the animation. This is a bit of a simplification, but the source code is available on my repository on GitHub for those who want to dive a little deeper!bin/run render_gif --subfolder=demo --bg_color=black --fg_color=red