🔄 Image Rotator
📐 工作原理與說明
radians = angle × π ÷ 180; for a multiple of 90° the canvas swaps width and height exactly, otherwise width = |w × cos| + |h × sin| and height = |w × sin| + |h × cos|, rounded up; the canvas stays transparent (no white fill); translate the origin to the centre, rotate, draw at (−w ÷ 2, −h ÷ 2); export PNG
本工具為純前端線上工具,資料在瀏覽器本地處理、不上傳伺服器,依據對應領域標準與規範進行計算或處理,結果僅供參考。 工具名稱:圖片旋轉 - 設計創意領域的線上工具。
Rotate an image by any angle or in 90-degree steps to correct framing, then export the rotated result locally.
請上傳圖片
📚 深度解析:圖片旋轉
💡 常見使用場景
- 手機豎圖轉正。
- 掃描件糾偏。
- 構圖旋轉。
順時針 90°
輸入:上傳橫圖、轉 90°。
處理:canvas 旋轉重繪。
輸出:旋轉圖下載。結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
❓ 常見問題(FAQ)
- 任意角度留白?
- 非 90° 倍數會留透明/底色邊,可裁掉。結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
- 處理大圖會卡嗎?
- 在瀏覽器本地用 Canvas 完成,圖越大越佔記憶體;建議先縮到合適尺寸再處理,資料不上傳。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Rotation angle | clockwise is positive and right angles avoid interpolation | Canvas 2D specification |
| Canvas expansion | arbitrary angles enlarge the bounding box, so resize the canvas | Canvas 2D specification |
| EXIF orientation | apply the EXIF Orientation tag first to avoid double rotation | CIPA DC-008 (Exif) |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準