Images API¶
Base URL: http://localhost:8000/api/v1/images
Upload Image¶
Upload an image file. The image is converted to grayscale internally and stored in the in-memory registry.
Request:
| Field | Type | Description |
|---|---|---|
file |
File | Image file (PNG, JPEG, BMP, TIFF, WEBP) |
Response 200:
Errors: 413 file too large · 415 unsupported format · 422 corrupt image
Get FT Component¶
Returns a specific FT component as a base64 PNG with optional display adjustments.
Request body:
| Field | Values | Default |
|---|---|---|
component |
magnitude · phase · real · imaginary |
— |
brightness |
0.1 – 5.0 |
1.0 |
contrast |
0.1 – 5.0 |
1.0 |
Note
Magnitude is returned in log-scale (log1p(|F|)) for perceptual clarity.
Response 200:
Get Spatial Adjusted¶
Returns the spatial image with brightness/contrast applied.
Response 200:
Resize Images¶
Resize a set of images to a unified size per policy. Used to align input images before mixing and to update viewport previews.
Request body:
{
"image_ids": ["id1", "id2", "id3"],
"policy": "smallest",
"fixed_height": 512,
"fixed_width": 512,
"keep_aspect": false
}
policy |
Behaviour |
|---|---|
smallest |
Resizes all to the smallest dimensions among loaded images |
largest |
Resizes all to the largest dimensions |
fixed |
Resizes all to fixed_height × fixed_width |
Response 200:
Delete Image¶
Removes the image from the in-memory registry.
Response 200: