mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Landing: - Preload the Bricolage display font (LCP heading) to cut first paint - Cap tool-page meta descriptions at ~160 chars via whole-sentence truncation, so SERP snippets no longer overflow or cut mid-phrase - Drop dead HowTo + FAQPage JSON-LD from tool pages (Google removed HowTo rich results in 2023 and FAQ rich results in 2026); the visible content stays. Breadcrumb + WebApplication schema retained - Shorten 22 tool titles that exceeded the ~60-char SERP limit - Add an optional h1 override to tool SEO data - Rewrite adjust-colors, smart-crop, and ringtone-maker to match real Search Console query intent (saturation; object-aware cropping; convert audio to ringtone), with query-matched H1s and FAQs Docs: - Add meta descriptions to 20 pages missing frontmatter Repo: - Ignore local credential JSON files (.secrets/, *client_secret*, *service_account*)
2.1 KiB
2.1 KiB
description
| description |
|---|
| Split one image into grid tiles by rows and columns or by pixel size, returned as a ZIP archive. |
Image Splitting
Split a single image into grid tiles by column/row count or by specific pixel dimensions. Returns a ZIP archive containing all tiles.
API Endpoint
POST /api/v1/tools/image/split
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| columns | integer | No | 3 | Number of columns to split into (1 to 100) |
| rows | integer | No | 3 | Number of rows to split into (1 to 100) |
| tileWidth | integer | No | - | Tile width in pixels (min 10). Overrides columns when both tileWidth and tileHeight are set. |
| tileHeight | integer | No | - | Tile height in pixels (min 10). Overrides rows when both tileWidth and tileHeight are set. |
| outputFormat | string | No | "original" |
Output format for tiles: original, png, jpg, webp, avif, jxl |
| quality | number | No | 90 | Output quality for lossy formats (1 to 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
The response is streamed directly as a ZIP file with Content-Type: application/zip. The filename follows the pattern split-<jobId>.zip.
Each tile inside the ZIP is named <originalBaseName>_r<row>_c<col>.<ext> (e.g. photo_r1_c1.png, photo_r2_c3.webp).
Notes
- Accepts a single image file.
- Supports HEIC, RAW, PSD, and SVG input formats (automatically decoded).
- When both
tileWidthandtileHeightare provided, they take priority overcolumns/rows. The grid dimensions are calculated asceil(imageWidth / tileWidth)andceil(imageHeight / tileHeight). - Edge tiles (rightmost column, bottom row) may be smaller than the specified tile size if the image dimensions are not evenly divisible.
- Maximum grid size is capped at 100x100 (10,000 tiles).
- The response streams the ZIP directly, so there is no JSON response body. Use
--outputwith curl to save the file.