feat: add dithering param and parallel frame rendering for GIF

- Add dithering bool param to GIFRequest (default true)
- Parallelize frame rendering with goroutines
- Conditional Floyd-Steinberg dithering for speed vs quality tradeoff
This commit is contained in:
devilreef 2026-01-23 00:51:38 +06:00
parent 0cbbe647f9
commit fb3c4a0107
4 changed files with 29 additions and 12 deletions

View file

@ -200,7 +200,8 @@ const OpenAPISpec = `{
"frames": {"type": "integer", "default": 36, "description": "Number of frames (36 = 10° per frame)"},
"width": {"type": "integer", "default": 512, "description": "Image width in pixels"},
"height": {"type": "integer", "default": 512, "description": "Image height in pixels"},
"delay": {"type": "integer", "default": 5, "description": "Centiseconds between frames"}
"delay": {"type": "integer", "default": 5, "description": "Centiseconds between frames"},
"dithering": {"type": "boolean", "default": true, "description": "Enable Floyd-Steinberg dithering (disable for faster rendering)"}
}
},
"ErrorResponse": {