Resize
Smart resize with algorithm choice for pixel art.
Resize
Resize pixel art images with algorithm-appropriate interpolation. Choose from nearest neighbor (pixel-perfect), bilinear, or bicubic scaling.
Endpoint
POST /api/image-ops/resizeParameters
| Name | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Image URL or base64-encoded image data |
size | string | Yes | Target dimensions as WxH (e.g. 256x256) |
algorithm | string | No | Resizing algorithm. Default: nearest_neighbor |
Algorithm Options
| Algorithm | Use Case |
|---|---|
nearest_neighbor | Pixel-perfect scaling, preserves sharp edges |
bilinear | Smoother scaling, slight blur at edges |
bicubic | High-quality smooth scaling |
Example
curl -X POST https://api.spritesynth.com/api/image-ops/resize \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "https://example.com/small-sprite.png",
"size": "256x256",
"algorithm": "nearest_neighbor"
}'Response
{
"id": "resize_567",
"status": "completed",
"asset": {
"url": "https://cdn.spritesynth.com/assets/resize_567.png",
"width": 256,
"height": 256
},
"credits_cost": 1,
"duration_ms": 400
}Tips
- Always use
nearest_neighborfor pixel art to preserve sharp edges. - Use
bilinearorbicubiconly for smooth artwork or anti-aliased images. - Upscaling with nearest neighbor maintains the pixel-art aesthetic.
Need help?
Join our Discord community for support and tips.
Was this page helpful?