Overview
Introduction
When a GIF's content is slanted, whether from an intentional shear applied earlier or an unwanted skew picked up during capture, this tool applies the precise corrective shear to straighten it back out.
It reuses this category's skew math directly, just with the angles flipped, so a known skew and its correction always stay mathematically consistent.
What Is GIF Unskewer?
A client-side tool that applies the negative of a given X/Y shear angle to every frame of an animated GIF, undoing a skew of that magnitude.
Internally it's a thin wrapper around gif-skewer's shear function with negated angles, not a separately implemented transform.
How GIF Unskewer Works
You supply the X and Y angles you believe were originally applied (or estimate visually), and the tool negates both before running the exact same forward-corner-projection and inverse-sampling shear gif-skewer uses.
Because shearing by -A after shearing by A returns geometry to its original slant, applying the negative angle straightens the content back out frame by frame.
When To Use GIF Unskewer
Use it right after gif-skewer if you skewed a GIF and want an easy, exact way back to the original angle.
It's also useful for correcting a GIF whose source material was already slanted (e.g. a scanned or photographed animation) once you've estimated the skew angle.
Often used alongside GIF Skewer, GIF Rotator and GIF Canvas Size Changer.
Features
Advantages
- Reuses gif-skewer's exact math, so the correction is always mathematically consistent with the original shear.
- Applies the same correction to every frame, keeping the un-skewed animation aligned throughout.
- Runs entirely client-side; nothing you upload leaves your browser.
Limitations
- Only undoes shear precisely if you know (or accurately estimate) the original angle; a wrong guess leaves residual slant.
- Since shearing changes canvas size, repeated skew/unskew cycles can leave extra transparent padding that needs trimming with gif-canvas-size-changer.
Examples
Best Practices & Notes
Best Practices
- Keep a record of any angle you use with gif-skewer so you can undo it exactly later with this tool.
- If you're estimating an unknown skew visually, try a few nearby angles and compare previews to find the best match.
- Trim any leftover transparent canvas afterward with gif-canvas-size-changer or gif-cropper if needed.
Developer Notes
unskewGif in gif-unskewer.ts calls skewGif from gif-skewer.ts with both angles negated and adds no independent geometry logic, keeping the skew/unskew pair guaranteed consistent rather than risking two hand-maintained implementations drifting apart.
GIF Unskewer Use Cases
- Undoing a shear previously applied with gif-skewer
- Straightening a GIF whose source content was captured at a slant
- Correcting a faux-3D lean effect back to an upright animation
Common Mistakes
- Entering the negative of the original angle instead of the same magnitude; the tool already negates internally, so enter the original angle as-is.
- Expecting an exact pixel-perfect restoration when the input angle is only an estimate rather than the exact original skew.
Tips
- Pair this with gif-skewer during testing: skew, then unskew with the same numbers, and confirm you land back where you started.
- If residual transparent padding bothers you after unskewing, crop it away with gif-cropper.