Add Vignette Effect to a PNG
Add a customizable vignette effect to PNG images online. Control intensity, size, shape, softness, and color with real-time preview and instant download.
About
A vignette effect darkens (or tints) the peripheral regions of an image relative to its center, guided by a radial falloff function. The brightness reduction at pixel coordinates (x, y) is proportional to the normalized Euclidean distance d from the image centroid, passed through a Hermite smoothstep curve. Misconfigured vignettes produce banding artifacts or unnatural halos that degrade perceived image quality. This tool computes the effect per-pixel on a full-resolution Canvas, preserving the alpha channel and outputting a lossless PNG. Note: processing time scales with pixel count. A 4000×3000 image contains 12 million pixels, each requiring distance calculation, smoothstep evaluation, and color blending.
The implementation supports elliptical vignettes that respect the image aspect ratio, arbitrary tint colors (not limited to black), and independent control of inner radius (where the effect begins) and softness (the width of the transition band). The smoothstep function eliminates hard edges that plague linear falloff methods. All computation runs in-browser with zero server uploads. Limitation: this tool approximates an optical vignette caused by lens geometry. It does not replicate wavelength-dependent falloff or cos⁴ law behavior of real optical systems.
Formulas
The vignette factor V for a pixel at position (x, y) is computed as follows. First, the normalized distance d from the image center is calculated:
For circular mode, rx = ry = half-diagonal. For elliptical mode, rx = w/2 and ry = h/2. The smoothstep transition maps d into a vignette factor:
Final pixel color blending with tint color (Rt, Gt, Bt):
Where I = intensity (0 - 1), rinner = inner radius threshold, s = softness (transition band width), cx, cy = image center coordinates, w, h = image width and height. The alpha channel is left unmodified to preserve transparency.
Reference Data
| Parameter | Range | Default | Effect Description |
|---|---|---|---|
| Intensity | 0 - 100% | 60% | Maximum opacity of vignette at image corners |
| Inner Radius | 0 - 100% | 30% | Distance from center where effect begins (as % of half-diagonal) |
| Softness | 0 - 100% | 50% | Width of the transition band between clear and vignetted regions |
| Shape | Circular / Elliptical | Elliptical | Circular ignores aspect ratio; elliptical matches image proportions |
| Tint Color | Any RGB hex | #000000 | Color blended into peripheral pixels |
| Smoothstep Order | Hermite (3rd order) | - | Produces C1 continuous falloff, no banding |
| Output Format | PNG (lossless) | - | Preserves alpha channel and color depth |
| Max Recommended Size | 8000×8000 | - | Larger images may cause memory pressure in browser tabs |
| Cos&sup4; Law Falloff | cos4(θ) | - | Real optical vignette model (not implemented here) |
| Linear Falloff | clamp(d) | - | Causes visible banding, inferior to smoothstep |
| Gaussian Falloff | e−d² | - | Smooth but lacks inner radius control |
| Alpha Preservation | Yes | - | Transparent pixels remain transparent |