Image Shape Mask & Feather
Clip a photo into a soft rectangle or ellipse with PNG transparency.
Try an example: A circular transparent cutout
How it works
Upload a photo and apply a rectangular or elliptical alpha mask with adjustable bounds, inward feathering and inversion. Download a transparent PNG while preserving the original image dimensions.
- The source is auto-oriented and converted to sRGB. Its existing alpha is multiplied by mask coverage. Source dimensions are preserved; metadata is stripped.
- Rectangle distance uses the nearest edge; ellipse distance uses normalized radial distance scaled by the smaller radius. Feather transitions inward with smoothstep; it approximates distance for noncircular ellipses.
- Inputs are limited to 4 MP. GIF uses its first frame. This is a geometric mask, not automatic subject detection. The browser Design Layers mode uses the same mask engine.
Sources
For scripts and AI agents
- JSON API:
POST https://luminaimagemask.usefulweb.app/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://luminaimagemask.usefulweb.app/mcp· tool namelumina_image_mask
Example request
curl -s -X POST https://luminaimagemask.usefulweb.app/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"image":{"filename":"sample.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"},"shape":"ellipse","feather":3}'