mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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.
4.4 KiB
4.4 KiB
description, i18n_source_hash, i18n_provenance, i18n_output_hash
| description | i18n_source_hash | i18n_provenance | i18n_output_hash |
|---|---|---|---|
| एक छवि को पंक्तियों और स्तंभों द्वारा या पिक्सेल आकार द्वारा ग्रिड टाइलों में विभाजित करें, जिसे ZIP आर्काइव के रूप में लौटाया जाता है। | 838f5fa791b0 | human | 3c6671378498 |
इमेज स्प्लिट
एक अकेली छवि को स्तंभ/पंक्ति गणना द्वारा या विशिष्ट पिक्सेल आयामों द्वारा ग्रिड टाइलों में विभाजित करें। सभी टाइलों वाला एक ZIP आर्काइव लौटाता है।
API Endpoint
POST /api/v1/tools/image/split
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| columns | integer | No | 3 | विभाजित करने के लिए स्तंभों की संख्या (1 से 100) |
| rows | integer | No | 3 | विभाजित करने के लिए पंक्तियों की संख्या (1 से 100) |
| tileWidth | integer | No | - | पिक्सेल में टाइल चौड़ाई (न्यूनतम 10)। जब tileWidth और tileHeight दोनों सेट हों तो columns को ओवरराइड करता है। |
| tileHeight | integer | No | - | पिक्सेल में टाइल ऊँचाई (न्यूनतम 10)। जब tileWidth और tileHeight दोनों सेट हों तो rows को ओवरराइड करता है। |
| outputFormat | string | No | "original" |
टाइलों के लिए आउटपुट फ़ॉर्मेट: original, png, jpg, webp, avif, jxl |
| quality | number | No | 90 | लॉसी फ़ॉर्मेट के लिए आउटपुट गुणवत्ता (1 से 100) |
Example Request
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
प्रतिक्रिया Content-Type: application/zip के साथ सीधे एक 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 प्रतिक्रिया बॉडी नहीं है। फ़ाइल सहेजने के लिए curl के साथ
--outputका उपयोग करें।