Same frames. Same bytes.
Wezen turns Ruby pixel data into deterministic APNG, GIF, PNG, and asciinema media. No runtime dependencies beyond the standard library.
demo.apngdemo.gifdemo.castEncode for the place it plays.
One animation timeline produces stable assets for browsers, terminals, documentation, and test fixtures.
Preserves full RGBA pixels and writes changed frame rectangles when it can do so exactly.
Builds deterministic global or adaptive palettes with optional Floyd–Steinberg or Bayer dithering.
Writes compact, predictable still images with Ruby’s standard zlib implementation.
Serializes terminal output, input, and resize events in asciinema JSON Lines format.
Shape the timeline before export.
Pixel operations stay explicit. Repeated frames coalesce, delays remain visible, and every encoder receives the same source.
gem install wezen
coalesceMerge repeated frames
Combine identical or near-identical pixels and add their delays.
scaleResize without ambiguity
Apply deterministic nearest-neighbor scaling to every RGBA frame.
cropKeep the useful region
Crop the same explicit bounds across the complete animation.
drop_toSet the sample rate
Reduce a timeline to a chosen frames-per-second target.