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

50 lines
3.0 KiB
Markdown

---
description: "تقسيم صورة واحدة إلى بلاطات شبكية حسب عدد الصفوف والأعمدة أو حسب الحجم بالبكسل، وإرجاعها كأرشيف ZIP."
i18n_source_hash: 838f5fa791b0
i18n_provenance: human
i18n_output_hash: 75b8145cb271
---
# تقسيم الصورة {#image-splitting}
قسّم صورة واحدة إلى بلاطات شبكية حسب عدد الأعمدة/الصفوف أو حسب أبعاد بكسل محددة. تُرجع أرشيف ZIP يحتوي على جميع البلاطات.
## نقطة نهاية API {#api-endpoint}
`POST /api/v1/tools/image/split`
## المعاملات {#parameters}
| المعامل | النوع | مطلوب | الافتراضي | الوصف |
|-----------|------|----------|---------|-------------|
| columns | integer | لا | 3 | عدد الأعمدة المراد التقسيم إليها (1 إلى 100) |
| rows | integer | لا | 3 | عدد الصفوف المراد التقسيم إليها (1 إلى 100) |
| tileWidth | integer | لا | - | عرض البلاطة بالبكسل (10 كحد أدنى). يتجاوز `columns` عند ضبط كل من `tileWidth` و`tileHeight`. |
| tileHeight | integer | لا | - | ارتفاع البلاطة بالبكسل (10 كحد أدنى). يتجاوز `rows` عند ضبط كل من `tileWidth` و`tileHeight`. |
| outputFormat | string | لا | `"original"` | صيغة مخرجات البلاطات: `original`، `png`، `jpg`، `webp`، `avif`، `jxl` |
| quality | number | لا | 90 | جودة المخرجات للصيغ ذات الفقد (1 إلى 100) |
## مثال طلب {#example-request}
```bash
curl -X POST http://localhost:1349/api/v1/tools/image/split \
-F "file=@large-image.png" \
-F 'settings={"columns":3,"rows":3,"outputFormat":"png"}' \
--output split-tiles.zip
```
## مثال استجابة {#example-response}
تُبثّ الاستجابة مباشرة كملف ZIP مع `Content-Type: application/zip`. يتبع اسم الملف النمط `split-<jobId>.zip`.
كل بلاطة داخل الـ ZIP تُسمى `<originalBaseName>_r<row>_c<col>.<ext>` (مثل `photo_r1_c1.png`، `photo_r2_c3.webp`).
## ملاحظات {#notes}
- تقبل ملف صورة واحدًا.
- تدعم صيغ المدخلات HEIC وRAW وPSD وSVG (تُفكّ ترميزاتها تلقائيًا).
- عند توفير كل من `tileWidth` و`tileHeight`، فإنهما يأخذان الأولوية على `columns`/`rows`. تُحسب أبعاد الشبكة كـ `ceil(imageWidth / tileWidth)` و`ceil(imageHeight / tileHeight)`.
- قد تكون بلاطات الحواف (العمود الأيمن، الصف السفلي) أصغر من حجم البلاطة المحدد إذا لم تكن أبعاد الصورة قابلة للقسمة بالتساوي.
- الحد الأقصى لحجم الشبكة مقيّد بـ 100x100 (10,000 بلاطة).
- تبثّ الاستجابة ملف الـ ZIP مباشرة، لذا لا يوجد جسم استجابة بصيغة JSON. استخدم `--output` مع curl لحفظ الملف.