Files
SnapOtter/apps/docs/de/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.3 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
Drehe Bilder um jeden beliebigen Winkel und spiegle sie horizontal oder vertikal. c4ed5f7e270b human b73dc2e4ca1c

Bild drehen & spiegeln

Drehe Bilder um einen beliebigen Winkel und/oder spiegle sie horizontal oder vertikal. Dreh- und Spiegeloperationen können in einer einzigen Anfrage kombiniert werden.

API-Endpunkt

POST /api/v1/tools/image/rotate

Akzeptiert Multipart-Formulardaten mit einer Bilddatei und einem JSON-Feld settings.

Parameter

Parameter Typ Erforderlich Standard Beschreibung
angle number Nein 0 Drehwinkel in Grad (im Uhrzeigersinn). Akzeptiert jeden numerischen Wert.
horizontal boolean Nein false Das Bild horizontal spiegeln (Spiegelbild)
vertical boolean Nein false Das Bild vertikal spiegeln

Beispielanfrage

90 Grad im Uhrzeigersinn drehen:

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}'

Horizontal spiegeln:

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}'

Drehen und Spiegeln zusammen:

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}'

Beispielantwort

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

Hinweise

  • Zuerst wird die Drehung angewendet, dann die Spiegeloperationen.
  • Drehungen, die nicht 90 Grad betragen (z. B. 45 Grad), vergrößern die Leinwand, damit das gedrehte Bild passt, mit transparenter oder schwarzer Füllung je nach Ausgabeformat.
  • Gängige Werte: 90, 180, 270 für Vierteldrehungen.
  • Die EXIF-Orientierung wird vor der Verarbeitung automatisch angewendet, sodass die Drehung relativ zur visuellen Orientierung erfolgt.