mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
3.2 KiB
3.2 KiB
description, i18n_source_hash, i18n_provenance, i18n_output_hash
| description | i18n_source_hash | i18n_provenance | i18n_output_hash |
|---|---|---|---|
| Konvertiert Bilder zwischen Formaten, einschließlich moderner Formate wie AVIF, JXL und HEIC. | 562f8270e8c3 | human | 1a9d52e38c55 |
Konvertieren
Konvertiert Bilder zwischen Formaten. Unterstützt gängige Webformate sowie spezialisierte Formate wie HEIC, JXL, BMP, ICO, JP2, QOI und PSD.
API-Endpunkt
POST /api/v1/tools/image/convert
Akzeptiert Multipart-Formulardaten mit einer Bilddatei und einem JSON-Feld settings.
Parameter
| Parameter | Typ | Erforderlich | Standard | Beschreibung |
|---|---|---|---|---|
| format | string | Ja | - | Zielformat: jpg, png, webp, avif, tiff, gif, heic, heif, jxl, bmp, ico, jp2, qoi, psd, ppm, eps, tga |
| quality | number | Nein | - | Ausgabequalität (1-100). Gilt für verlustbehaftete Formate wie jpg, webp, avif, heic. |
Unterstützte Ausgabeformate
| Format | Typ | Hinweise |
|---|---|---|
| jpg | Verlustbehaftet | JPEG, beste Kompatibilität |
| png | Verlustfrei | Unterstützt Transparenz |
| webp | Beides | Modernes Webformat, gute Komprimierung |
| avif | Verlustbehaftet | Format der nächsten Generation, ausgezeichnete Komprimierung |
| tiff | Beides | Druck-/Publishing-Workflows |
| gif | Verlustfrei | Auf 256 Farben beschränkt |
| heic / heif | Verlustbehaftet | Format des Apple-Ökosystems |
| jxl | Beides | JPEG XL, Format der nächsten Generation |
| bmp | Verlustfrei | Unkomprimierte Bitmap |
| ico | Verlustfrei | Windows-Symbolformat |
| jp2 | Verlustbehaftet | JPEG 2000 |
| qoi | Verlustfrei | Quite OK Image-Format |
| psd | Ebenen | Adobe Photoshop (erfordert ImageMagick) |
| ppm | Verlustfrei | Portable Pixmap (PPM/PGM/PBM) |
| eps | Vektor | Encapsulated PostScript |
| tga | Verlustfrei | Targa-Bildformat |
Beispielanfrage
In WebP konvertieren:
curl -X POST http://localhost:1349/api/v1/tools/image/convert \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@photo.jpg" \
-F 'settings={"format": "webp", "quality": 85}'
In PNG konvertieren (verlustfrei):
curl -X POST http://localhost:1349/api/v1/tools/image/convert \
-H "Authorization: Bearer si_your-api-key" \
-F "file=@photo.jpg" \
-F 'settings={"format": "png"}'
Beispielantwort
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/photo.webp",
"originalSize": 2450000,
"processedSize": 680000
}
Hinweise
- Die Erweiterung des Ausgabedateinamens wird automatisch an das Zielformat angepasst.
- SVG-Eingaben werden vor der Konvertierung mit 300 DPI gerastert.
- Die PSD-Konvertierung erfordert, dass ImageMagick auf dem Server installiert ist.
- BMP, EPS, ICO, JP2, JXL, PPM, QOI und TGA verwenden spezialisierte CLI-Encoder und umgehen die Sharp-Verarbeitung.
- Die HEIC/HEIF-Kodierung verwendet die HEIC-Encoder-Bibliothek des Systems.
- Die Eingabeformate sind vielfältig: JPEG, PNG, WebP, AVIF, TIFF, GIF, HEIC, RAW (CR2, NEF, ARW usw.), PSD, SVG, BMP und mehr.