sprite sheet maker
Keep a GIF pose paired with its delay during a libvips flip
A vertical flip is supposed to invert an individual sprite pose. With a multipage GIF opened by libvips as a tall raster, flipping the whole strip also reverses the stored page order. The frame delay list can keep its original sequence, pairing the wrong duration with a once-correct image.
Model each page as a record with a pose ID, its raster rectangle and its authored delay. For a flip-in-place operation, read the frame height and flip one raster rectangle at a time. Put every result back at the same sequence index and carry over the delay and loop metadata. Reversing playback is a separate editorial operation that should move each transformed image with its own duration.
Construct three asymmetric test poses. Give the first pose a small top marker and the last pose a conspicuously long hold. Decode the result as an animation and check which edge has the marker, which pose comes first, and which pose receives the long hold. technical guide and test fixture records the mismatch from a whole-strip flip. Checking the order and exposure together helps catch mistakes a first-frame thumbnail would hide.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.