How it works
- The image is drawn to a canvas (long edge capped at 1800 px) and its pixels are read out.
- A separable box blur of your chosen radius produces a soft copy. The difference between original and blur is the detail layer.
- That detail layer is multiplied by the amount and added back — the classic unsharp mask. The threshold skips differences smaller than the value you set, so flat sky and skin do not turn grainy.
- Export is PNG, so the sharpening is not immediately undone by JPEG compression.