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*)
97 lines
3.5 KiB
Markdown
97 lines
3.5 KiB
Markdown
---
|
|
description: One-click auto-enhance that analyzes an image and corrects exposure, contrast, white balance, saturation, and sharpness.
|
|
---
|
|
|
|
# Image Enhancement
|
|
|
|
One-click auto-improve with smart analysis. Analyzes the image and applies exposure, contrast, white balance, saturation, sharpness, and denoising corrections.
|
|
|
|
## API Endpoint
|
|
|
|
`POST /api/v1/tools/image/image-enhancement`
|
|
|
|
**Processing:** Synchronous (uses `createToolRoute` factory, returns result directly)
|
|
|
|
**Model bundle:** None required for basic enhancement. The `upscale-enhance` bundle (4-5 GB) is used only when `deepEnhance` is enabled (for AI noise removal via SCUNet).
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Required | Default | Description |
|
|
|-----------|------|----------|---------|-------------|
|
|
| file | file | Yes | - | Image file (multipart) |
|
|
| mode | string | No | `"auto"` | Enhancement mode: `auto`, `portrait`, `landscape`, `low-light`, `food`, `document` |
|
|
| intensity | number | No | `50` | Overall enhancement intensity (0-100) |
|
|
| corrections | object | No | all `true` | Selective corrections to apply (see below) |
|
|
| deepEnhance | boolean | No | `false` | Enable AI-powered noise removal (requires `noise-removal` tool installed) |
|
|
|
|
### Corrections Object
|
|
|
|
| Field | Type | Default | Description |
|
|
|-------|------|---------|-------------|
|
|
| exposure | boolean | `true` | Auto-correct exposure |
|
|
| contrast | boolean | `true` | Auto-correct contrast |
|
|
| whiteBalance | boolean | `true` | Auto-correct white balance |
|
|
| saturation | boolean | `true` | Auto-correct saturation |
|
|
| sharpness | boolean | `true` | Auto-sharpen |
|
|
| denoise | boolean | `true` | Light denoising |
|
|
|
|
## Example Request
|
|
|
|
```bash
|
|
curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement \
|
|
-F "file=@photo.jpg" \
|
|
-F 'settings={"mode":"portrait","intensity":70,"corrections":{"exposure":true,"contrast":true,"sharpness":false}}'
|
|
```
|
|
|
|
## Response (200 OK)
|
|
|
|
```json
|
|
{
|
|
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
"downloadUrl": "/api/v1/download/{jobId}/photo.jpg",
|
|
"originalSize": 300000,
|
|
"processedSize": 310000
|
|
}
|
|
```
|
|
|
|
## Analyze Endpoint
|
|
|
|
`POST /api/v1/tools/image/image-enhancement/analyze`
|
|
|
|
Analyzes an image and returns correction recommendations without applying them.
|
|
|
|
### Parameters
|
|
|
|
| Parameter | Type | Required | Description |
|
|
|-----------|------|----------|-------------|
|
|
| file | file | Yes | Image file (multipart) |
|
|
|
|
### Example Request
|
|
|
|
```bash
|
|
curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement/analyze \
|
|
-F "file=@photo.jpg"
|
|
```
|
|
|
|
### Response (200 OK)
|
|
|
|
```json
|
|
{
|
|
"corrections": {
|
|
"exposure": { "value": 0.3, "direction": "brighten" },
|
|
"contrast": { "value": 0.2, "direction": "increase" },
|
|
"whiteBalance": { "value": 200, "direction": "warmer" },
|
|
"saturation": { "value": 0.1, "direction": "increase" },
|
|
"sharpness": { "value": 0.4, "direction": "sharpen" }
|
|
}
|
|
}
|
|
```
|
|
|
|
## Notes
|
|
|
|
- This tool uses the synchronous `createToolRoute` factory, so it returns a standard response (not 202 async).
|
|
- The `mode` parameter adjusts how corrections are weighted (e.g., portrait mode is gentler on skin tones, landscape mode boosts saturation).
|
|
- When `deepEnhance` is enabled and the `noise-removal` tool (SCUNet) is installed, an additional AI denoising pass is applied after the standard corrections.
|
|
- The analyze endpoint is useful for previewing what corrections would be applied before committing.
|
|
- Supports HEIC/HEIF, RAW, TGA, PSD, EXR, and HDR input formats via automatic decoding.
|