Overview
Introduction
This tool adds a swirling whirlpool distortion around a PNG's center, entirely in your browser.
It works on a plain pixel buffer, so nothing you upload is sent to a server.
What Is PNG Whirl Adder?
A whirl (swirl) distortion tool that warps pixels around the image's center by a rotation angle that decays smoothly from the center outward, rather than a single uniform rotation angle applied to the whole image.
It builds on the same inverse-sampling technique the PNG Rotator uses, but with a radius-dependent angle instead of one fixed angle.
How PNG Whirl Adder Works
For every output pixel, the tool computes its distance from the image center and, if that distance is within the whirl radius, derives a local rotation angle that's strongest exactly at the center and fades quadratically to zero at the radius's edge.
It then works backward (inverse sampling) using that local angle to find the corresponding source pixel, the same technique `rotatePng` uses for a uniform rotation, just with a position-dependent angle instead of a constant one.
When To Use PNG Whirl Adder
Use it for a creative, eye-catching swirl effect on a photo or graphic, or to simulate a whirlpool/vortex look.
It works especially well centered on a focal point like a face, logo, or single object.
Often used alongside PNG Rotator, Glitch PNG Creator and PNG Zoomer.
Features
Advantages
- Runs entirely client-side; nothing you upload leaves your device.
- Independent strength and radius controls let you dial in anything from a subtle twist to a dramatic vortex.
- Pixels outside the whirl radius are left completely untouched, keeping the rest of the image sharp.
Limitations
- Sampling is nearest-neighbor, so strongly whirled areas can show some stair-stepping rather than perfectly smooth curves.
- A whirl centered on an off-center subject won't automatically follow it; the effect is always centered on the image's geometric middle.
Examples
Best Practices & Notes
Best Practices
- Center your subject in the source image before whirling for the most flattering result.
- Start with a moderate strength (like 90-180) and increase gradually rather than jumping to extreme values.
Developer Notes
The pure whirl math lives in a lib function operating on a Uint8ClampedArray pixel buffer, computing a per-pixel angle as `strength * (1 - distance/radius)^2` and reusing the same inverse-rotation sampling formula `rotatePng` uses, just with that position-dependent angle substituted in for its single constant one.
PNG Whirl Adder Use Cases
- Creating an eye-catching swirl effect for a poster or thumbnail
- Simulating a whirlpool or vortex visual effect
- Adding a playful distortion to an icon or avatar
Common Mistakes
- Setting the radius too small and being surprised the effect barely shows.
- Expecting the whirl to follow an off-center subject — it's always centered on the image's geometric middle.
Tips
- Try a radius around 80-120% to have the whirl fade out gracefully near the image edges.
- Combine with the corner rounder for a swirled circular badge-style graphic.