Skip to content

Conversation

@mrousavy
Copy link
Owner

@mrousavy mrousavy commented Nov 10, 2025

// flip upside down (180°)
const upsideDown = image.rotate(180)
// tilt by an arbitrary angle (45°)
const tilted = image.rotate(45)
const whatever = image.rotate(3275)
// flip upside down (180°) using EXIF/Matrix flags, no actual buffer rotation
const upsideDownButFast = image.rotate(180, /* allowFastFlagRotation */ true)

FWIW the allowFastFlagRotation is significantly faster on iOS:

 (NOBRIDGE) LOG  Rotate 180° with allowFastFlagRotation=false took 11.66ms
 (NOBRIDGE) LOG  Rotate 180° with allowFastFlagRotation=true  took 0.33ms

@mrousavy mrousavy merged commit c1064b2 into main Nov 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants