Dither images using custom palettes and patterns!
Accepts a multipart form submission containing an input image and a palette image, applies dithering, and returns the processed result as a Base64-encoded PNG in JSON.
- Method:
POST - Content-Type:
multipart/form-data
inputImage: source image filepalette: palette image file
pattern: dithering pattern to apply [hilbertorlinear]- Defaults to
hilbertwhen omitted
- Defaults to
- The client submits standard
multipart/form-data. - The form must include exactly two image fields:
inputImageandpalette. - Requests with missing, extra, or malformed image fields are rejected.
- In the AWS API Gateway → Lambda flow, the multipart request body is received by Lambda as Base64-encoded data and decoded server-side before form parsing.
{
"resultImage": "<base64-encoded PNG>"
}{
"error": "[validation or parsing error message]"
}