# Image Shape Mask & Feather > Clip a photo into a soft rectangle or ellipse with PNG transparency. 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. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminaimagemask.usefulweb.site/ (interactive tool at https://luminaimagemask.usefulweb.site/tool) - JSON API: POST https://luminaimagemask.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://luminaimagemask.usefulweb.site/api/v1/tool) - OpenAPI: https://luminaimagemask.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://luminaimagemask.usefulweb.site/mcp - tool `lumina_image_mask` ## Inputs - image (file, required): Photo (PNG, JPEG, WebP or GIF) - shape (select): Mask shape - x (number): Mask left (%) - y (number): Mask top (%) - width (number): Mask width (%) - height (number): Mask height (%) - feather (number): Inward feather (normalized %) - invert (boolean): Invert mask ## Method - 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.