Files
SnapOtter/apps/docs/ar/tools/image/convert.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

3.5 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
تحويل الصور بين الصيغ بما في ذلك الصيغ الحديثة مثل AVIF وJXL وHEIC. 2639f333073f human c4d219043dd6

تحويل الصورة

حوّل الصور بين الصيغ. يدعم صيغ الويب الشائعة إضافة إلى صيغ متخصصة مثل HEIC وJXL وBMP وICO وJP2 وQOI وPSD.

API Endpoint

POST /api/v1/tools/image/convert

يقبل بيانات نموذج multipart تحتوي على ملف صورة وحقل JSON باسم settings.

Parameters

Parameter Type Required Default Description
format string Yes - الصيغة المستهدفة: jpg، png، webp، avif، tiff، gif، heic، heif، jxl، bmp، ico، jp2، qoi، psd، ppm، eps، tga
quality number No - جودة الإخراج (1-100). تنطبق على الصيغ ذات الفقد مثل jpg وwebp وavif وheic.

Supported Output Formats

Format Type Notes
jpg ذات فقد JPEG، أفضل توافق
png بلا فقد يدعم الشفافية
webp كلاهما صيغة ويب حديثة، ضغط جيد
avif ذات فقد صيغة الجيل القادم، ضغط ممتاز
tiff كلاهما سير عمل الطباعة/النشر
gif بلا فقد محدودة بـ 256 لونًا
heic / heif ذات فقد صيغة منظومة Apple
jxl كلاهما JPEG XL، صيغة الجيل القادم
bmp بلا فقد صورة نقطية غير مضغوطة
ico بلا فقد صيغة أيقونة Windows
jp2 ذات فقد JPEG 2000
qoi بلا فقد صيغة Quite OK Image
psd متعددة الطبقات Adobe Photoshop (يتطلب ImageMagick)
ppm بلا فقد Portable Pixmap (PPM/PGM/PBM)
eps متجهية Encapsulated PostScript
tga بلا فقد صيغة صورة Targa

Example Request

التحويل إلى WebP:

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

التحويل إلى PNG (بلا فقد):

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

Example Response

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

Notes

  • يُحدَّث امتداد اسم ملف الإخراج تلقائيًا ليطابق الصيغة المستهدفة.
  • تُنقَّط مدخلات SVG عند 300 DPI قبل التحويل.
  • يتطلب تحويل PSD تثبيت ImageMagick على الخادم.
  • تستخدم BMP وEPS وICO وJP2 وJXL وPPM وQOI وTGA مُرمِّزات CLI متخصصة وتتجاوز معالجة Sharp.
  • يستخدم ترميز HEIC/HEIF مكتبة مُرمِّز HEIC في النظام.
  • صيغ الإدخال واسعة: JPEG وPNG وWebP وAVIF وTIFF وGIF وHEIC وRAW (CR2 وNEF وARW وغيرها) وPSD وSVG وBMP والمزيد.