EIT easy-image-tools / Turn soft transparency into hard edges

Turn soft transparency into hard edges

Binarizes the alpha channel by threshold: semi-transparent pixels become either fully transparent or fully opaque.

Nothing found — try another word.

01

Turn soft transparency into hard edges

Nothing found — try another word.

Alpha threshold

Nothing found — try another word.

Preview
Source
Drop a PNG here or click / paste (Ctrl+V) — processed locally
Result
no result yet

Turn soft transparency into hard edges makes transparency a decision instead of a gradient: each pixel's opacity is compared with the Alpha threshold, and everything at or above it becomes fully opaque while everything below becomes fully transparent. Semi-transparent pixels snap to one side or the other, colors are left untouched, and the picture ends up with crisp, unfiltered edges — the same look a mask-based cutout has. The whole pass runs in your browser.

  • Runs entirely in your browser: no upload, no server, no signup.
  • Alpha threshold from 0 to 100 percent; a pixel exactly at it stays visible.
  • Colors are never touched — only the fourth channel is rewritten.
  • Soft shadows and anti-aliased rims collapse; feathering is the opposite operation.
  • Free with no daily limit, no watermark and no account, also for commercial use.

How to use it

  1. Drop the image with soft edges into the source area, or pick a file from your device.
  2. Set Alpha threshold; 50 splits the opacity range in half.
  3. Lower it to keep more of the soft rim, raise it to cut the rim away.
  4. Download the result as PNG - JPG has no alpha channel to store it.

Questions

What happens to a pixel at exactly the threshold?

It becomes fully opaque. The rule is that a value at or above the threshold goes on and anything below it goes off, so 50 leaves every pixel with 50 percent opacity or more visible.

Will the edges look smooth afterwards?

No, they look hard. The soft ramp collapses into a hard rim with a visible staircase along a diagonal, and feathering is the opposite of what this tool does.

My soft shadow vanished.

A shadow lives in the semi-transparent range, and hardening sends everything below the threshold to fully transparent. Lower the threshold to keep it, or keep the shadow by feathering instead.

Does it change the colors of the picture?

No. Red, green and blue are copied through untouched and only the fourth channel is rewritten. Use the show transparent areas tool first to see which pixels are about to flip.

Related tools