Files
SnapOtter/apps/docs/ja/tools/image/rotate.md
T
SnapOtterandGitHub f858c4cea0 feat: clearer, disambiguated tool names across all surfaces (#520)
Renames 18 ambiguous or hard-to-search tool names so image tools self-qualify like the other modalities ("Compress" becomes "Compress Image"), and cleans up a few awkward names. Propagated across search (constants.ts), display (en.ts + 20 locales), the OpenAPI base spec + 20 locale specs, and the docs tool-page headings in 21 languages. Removes the duplicate "Normalize Audio" summary shared by the video and audio endpoints. Tool ids and routes are unchanged, so no API paths or bookmarks break.
2026-07-15 21:55:51 +08:00

2.5 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
任意の角度で画像を回転し、水平方向または垂直方向に反転します。 c4ed5f7e270b human f4f347d12e10

画像回転と反転

画像を任意の角度で回転したり、水平方向または垂直方向に反転したりします。回転と反転の操作は 1 回のリクエストで組み合わせられます。

API エンドポイント

POST /api/v1/tools/image/rotate

画像ファイルと JSON の settings フィールドを含むマルチパートフォームデータを受け付けます。

パラメーター

パラメーター 必須 デフォルト 説明
angle number No 0 回転角度(度、時計回り)。任意の数値を受け付ける。
horizontal boolean No false 画像を水平方向に反転(ミラー)
vertical boolean No false 画像を垂直方向に反転

リクエスト例

時計回りに 90 度回転:

curl -X POST http://localhost:1349/api/v1/tools/image/rotate \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"angle": 90}'

水平方向に反転:

curl -X POST http://localhost:1349/api/v1/tools/image/rotate \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"horizontal": true}'

回転と反転を同時に行う:

curl -X POST http://localhost:1349/api/v1/tools/image/rotate \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@photo.jpg" \
  -F 'settings={"angle": 45, "vertical": true}'

レスポンス例

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/photo.jpg",
  "originalSize": 2450000,
  "processedSize": 2480000
}

注意事項

  • 回転が先に適用され、その後に反転操作が行われます。
  • 90 度以外の回転(例: 45 度)では、回転した画像に合わせてキャンバスが拡大され、出力フォーマットに応じて透明または黒で塗りつぶされます。
  • よく使う値: 90、180、270(4 分の 1 回転)。
  • 処理前に EXIF の向きが自動適用されるため、回転は視覚的な向きに対して相対的になります。