API أدوات الصور
نقاط وصول لضغط الصور، تغيير الحجم، التحويل، التدوير، القص، إزالة الخلفية، التكبير، تمويه الوجوه، والعلامات المائية. جميع نقاط الوصول تقبل multipart/form-data وتُرجع الصورة المعالجة كملف ثنائي.
ضغط الصور
/api/image-compressضغط صورة لتقليل حجم الملف مع الحفاظ على الجودة البصرية. يدعم تنسيقات JPEG و PNG و WebP.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة (JPG، PNG، WebP) |
quality | number | Optional | جودة الضغط، 10-100. الافتراضي: 80 |
targetSizeKB | number | Optional | حجم الملف المستهدف بالكيلوبايت. يتجاوز quality إذا تم تعيينه. |
keepMetadata | string | Optional | اضبط على "true" للحفاظ على بيانات EXIF الوصفية |
Binary filecurl -X POST https://freefiletools.io/api/image-compress \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "quality=75" \
-o compressed.jpgتغيير حجم الصور
/api/image-resizeغيّر حجم صورة إلى أبعاد محددة أو بالنسبة المئوية. يدعم أبعاد البكسل والتحجيم بالنسبة المئوية.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
width | number | Optional | العرض المستهدف بالبكسل |
height | number | Optional | الارتفاع المستهدف بالبكسل |
percentage | number | Optional | نسبة التحجيم (مثال: 50 لنصف الحجم) |
fit | string | Optional | "inside" (الحفاظ على نسبة العرض إلى الارتفاع) أو "fill" (تمديد إلى الأبعاد الدقيقة) |
Binary file# Resize to specific width (height auto-calculated)
curl -X POST https://freefiletools.io/api/image-resize \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "width=800" \
-o resized.jpg
# Resize by percentage
curl -X POST https://freefiletools.io/api/image-resize \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "percentage=50" \
-o resized.jpgتحويل الصور
/api/image-convertحوّل صورة بين التنسيقات. يدعم PNG و JPG و WebP و AVIF.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
format | string | Required | التنسيق المستهدف: "png"، "jpg"، "webp"، أو "avif" |
quality | number | Optional | جودة الإخراج، 10-100 |
Binary filecurl -X POST https://freefiletools.io/api/image-convert \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "format=webp" \
-F "quality=85" \
-o photo.webpتدوير الصور
/api/image-rotateدوّر و/أو اعكس صورة. يدعم زوايا تدوير عشوائية والانعكاس الأفقي/العمودي.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
angle | number | Required | زاوية التدوير بالدرجات (مثال: 90، 180، 270) |
flipH | string | Optional | اضبط على "true" للانعكاس الأفقي |
flipV | string | Optional | اضبط على "true" للانعكاس العمودي |
Binary filecurl -X POST https://freefiletools.io/api/image-rotate \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "angle=90" \
-o rotated.jpgقص الصور
/api/image-cropاقصص صورة إلى منطقة مستطيلة محددة.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
x | number | Required | الإزاحة اليسرى لمستطيل القص بالبكسل |
y | number | Required | الإزاحة العلوية لمستطيل القص بالبكسل |
width | number | Required | عرض مستطيل القص بالبكسل |
height | number | Required | ارتفاع مستطيل القص بالبكسل |
Binary filecurl -X POST https://freefiletools.io/api/image-crop \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "x=100" \
-F "y=50" \
-F "width=500" \
-F "height=400" \
-o cropped.jpgإزالة الخلفية
/api/remove-bgأزل خلفية الصورة تلقائيًا. يُرجع PNG بخلفية شفافة.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
صورة PNG بخلفية شفافةcurl -X POST https://freefiletools.io/api/remove-bg \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o no-background.pngتكبير الصور
/api/image-upscaleكبّر صورة باستخدام الذكاء الاصطناعي لزيادة الدقة مع الحفاظ على التفاصيل.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
scale | number | Optional | معامل التكبير: 2 أو 4. الافتراضي: 2 |
Binary filecurl -X POST https://freefiletools.io/api/image-upscale \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "scale=4" \
-o upscaled.jpgتمويه الوجوه
/api/blur-faceاكتشف وموّه جميع الوجوه في الصورة تلقائيًا لحماية الخصوصية.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
Binary filecurl -X POST https://freefiletools.io/api/blur-face \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-o blurred.jpgعلامة مائية على الصور
/api/watermark-imageأضف علامة مائية نصية إلى صورة. خصّص النص والموضع.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Required | ملف صورة |
text | string | Required | نص العلامة المائية |
position | string | Optional | الموضع: "center"، "top-left"، "top-right"، "bottom-left"، "bottom-right" |
Binary filecurl -X POST https://freefiletools.io/api/watermark-image \
-H "x-api-key: fft_your_api_key" \
-F "[email protected]" \
-F "text=Copyright 2024" \
-F "position=bottom-right" \
-o watermarked.jpg