The Universal Image Rotator & Angle Straightener Studio by RiazHub is a powerful, privacy-first in-browser graphics utility designed to level crooked horizons, rotate photos, and eliminate corner voids in real time. Featuring both orthogonal stepped rotations (90° CW, 90° CCW, 180° Inversion, and horizontal/vertical flips) and an arbitrary micro-angle straightener with 0.1° sensitivity (-45.0° to +45.0° and 360° modes), the tool eliminates the frustration of crooked photographs without requiring software installations or server uploads.
The studio offers three mathematical framing algorithms to handle rotated edges: Inscribed Rectangle Auto-Crop (which dynamically calculates the maximum inner rectangular crop sharing the original aspect ratio to eradicate triangular corner voids without black borders), Expanded Canvas Bounding Envelope (which recalculates the full outer trigonometric boundaries to preserve 100% of image pixels), and Multi-Pattern Wedge Fill (with transparent alpha, custom solid hex color, or dynamic Gaussian blurred edge cushions). Equipped with an interactive Virtual Spirit Level, camera EXIF orientation auto-normalization, a 60 FPS split-screen before/after comparison swipe divider, an interactive drag-and-drop horizon leveling dial, and a zero-dependency in-memory PKZIP batch downloader, this utility provides professional-grade image calibration directly within the visitor’s browser.
Universal Image Rotator & Horizon Straightener
Rotate photos by 90°/180°, level tilted horizons with 0.1° micro-precision, auto-crop corner voids, and export lossless images or batch ZIP archives in real time.
Batch Rotation Queue
Inspect dimensions, applied angles, and download images individually or in a ZIP archive.
| Preview | Filename | Original | Rotated | Angle | Void Mode | Action |
|---|---|---|---|---|---|---|
| No images loaded yet. Drag photos into the uploader! | ||||||
1. Center-Origin Trigonometric Rotation
Standard Euclidean rotation spins around $(0,0)$. To rotate an image cleanly without clipping off-screen, the 2D affine matrix first translates coordinates to $(W/2, H/2)$, applies the trigonometric rotation, then projects back:
x' = (x - W/2)·cos(θ) - (y - H/2)·sin(θ) + W'/2
y' = (x - W/2)·sin(θ) + (y - H/2)·cos(θ) + H'/2
2. Auto-Crop Inscribed Rectangle (Zero Voids)
Rotating by arbitrary micro-angles (e.g., $3.5^\circ$) creates empty triangular corner wedges. The inscribed rectangle formula calculates the maximum inner dimensions that perfectly fit inside without showing unpainted corners:
r = W / H (Original Aspect Ratio)
W_crop = W / (|cos θ| + r · |sin θ|), H_crop = W_crop / r
3. Expanded Canvas Bounding Envelope
To retain 100% of the image without any crop clipping, the outer canvas bounding envelope is dynamically expanded to envelop the outer tilted perimeter:
W_new = |W · cos θ| + |H · sin θ|
H_new = |W · sin θ| + |H · cos θ|
4. Privacy & Lossless In-Browser Pipeline
All matrix calculations, bilinear interpolations, EXIF tags parsing, and export generation happen directly inside your browser memory using HTML5 Canvas & TypedArrays. Zero data ever leaves your computer.
Client-Side Memory • OffscreenCanvas • Zero Server Ping