Image redaction tutorial - rectangles, mosaic and undo per stroke

Open Tool Image Redact

Image redaction tutorial - rectangles, mosaic and undo per stroke

This walkthrough follows the real order of work: what the tool is for, what each control does, a five step pass, and a self-check before you ship the export.

When to use

Redacting an ID or bank screenshot has two common traps: the tool uploads the original to someone else server, and the cover is destructive so a misplaced box cannot be undone. This tool avoids both. The image stays in browser memory, every cover can be undone, and the export is a new file while the original stays untouched.

Three moves: import the image, drag a box, pick a cover style. Boxes are recorded in source pixels, so exports never shift because of display scaling, and each cover lands on the undo stack.

On an 800x600 image the canvas is ready about 75 ms after import. Covers are stored as an operation list rather than stacked pixels, so each repaint inside 100 steps stays within one frame and undo simply drops a record.

Only one source bitmap and one result canvas are kept. Export re-encodes through toBlob, so no second copy of the pixels sits in memory, and working through several files replaces the old canvas instead of piling up.

Steps

  1. Click the drop zone or drag an image in. JPG, PNG and WebP up to 20 MB.
  2. Choose black bar, white bar, mosaic or blur; for mosaic or blur set the strength slider.
  3. Drag a rectangle on the preview with the left button and release to apply; repeat for each area.
  4. Press Undo for one step, Start over for the whole image, or hold Compare to check for misses.
  5. Pick format and quality, then export, or copy to clipboard and paste straight into a chat.

Screenshots

These three shots come from the final build of this plugin.

The empty state: import and cover tools on the left, preview and history on the right.

Drag a box over the preview and the black bar appears as soon as you release.

Right column: the covered preview with the bar position and export size in view.

Features in detail

Four cover styles: black and white bars for full masking, mosaic and blur for keeping layout while hiding detail.

Box to apply:drag a rectangle and release, no second confirmation; a dashed outline previews the area while dragging.

Undo and redo: a snapshot before each cover, up to twelve steps back; Start over restores the imported image.

Compare:hold the compare button to see the original, release to return to the redacted result.

Export at source resolution, not screen size, so phone screenshots and camera files are not downscaled.

Everything local: no upload, no API, no storage; exports carry a timestamp in the filename.

What you get

Inputs

  • JPG, PNG or WebP up to 20 MB and 8000 px per side, decoded inside the browser only.
  • One of four covers: black bar, white bar, mosaic with 4 to 40 px grain, blur with 2 to 40 px radius.
  • Boxes are stored in source pixels, so resizing the window does not move them.

Outputs

  • PNG for lossless with alpha, or JPG at 60 to 100 quality; default name redacted-date-time.
  • Copy to clipboard is also available. The history lists only this session and clears on refresh.

Parameters

The workspace exposes 4 controls, from 笔刷大小 to JPG 质量, and every one of them only affects the local rendering: nothing is sent back to a server.

Ranges and defaults: 笔刷大小 (8–96(默认 32)), 马赛克颗粒 (4–40(默认 12)), 格式 (PNG · 无损、保留透明 / JPG · 体积更小), JPG 质量 (60–100(默认 90)). Values outside the slider range are rejected rather than silently clamped.

ControlTypeRange or options
笔刷大小range8–96(默认 32)
马赛克颗粒range4–40(默认 12)
格式selectPNG · 无损、保留透明 / JPG · 体积更小
JPG 质量range60–100(默认 90)

Typical cases

  • Masking an ID or vehicle licence before listing something second hand.
  • Sending a badge or access card screenshot where only the name and company should show.
  • Posting a bank statement in a group chat with all but the last four digits covered.

In each of these cases the pass is the same: load the file, make one change, check the preview, export and reopen. Skipping the reopen step is why people later discover a transparent halo or a truncated table that looked fine on screen.

A worked pass

Step 1: Click the drop zone or drag an image in. JPG, PNG and WebP up to 20 MB. Read the hint line before touching anything: it tells you which prerequisite is missing.

Step 2: Choose black bar, white bar, mosaic or blur; for mosaic or blur set the strength slider. Do not start with the most extreme setting; one small change is enough to see whether the result moves in the right direction.

Step 3: Drag a rectangle on the preview with the left button and release to apply; repeat for each area. Check the preview at 100% rather than the fitted view, because artefacts often hide in the downsampled version.

Step 4: Press Undo for one step, Start over for the whole image, or hold Compare to check for misses. Export once, open the file in a local viewer, and only then decide the settings are final.

Step 5: Pick format and quality, then export, or copy to clipboard and paste straight into a chat. Keep the source file untouched so you can repeat the pass with a different setting without re-importing.

Walking through the controls

The 笔刷大小 slider is bounded by 8–96(默认 32). Keep it near the default for a first pass, then move one step at a time: each step is visible in the preview, and moving it in large jumps makes it impossible to tell which setting produced the artefact you are trying to remove. Values outside the range are rejected instead of being silently clamped, so the number in the readout always matches what the export will use.

The 马赛克颗粒 slider is bounded by 4–40(默认 12). Keep it near the default for a first pass, then move one step at a time: each step is visible in the preview, and moving it in large jumps makes it impossible to tell which setting produced the artefact you are trying to remove. Values outside the range are rejected instead of being silently clamped, so the number in the readout always matches what the export will use.

The 格式 dropdown offers PNG · 无损、保留透明 / JPG · 体积更小. Switching it re-renders the preview immediately, so compare two neighbouring options rather than jumping across the whole list; the exported file follows the option that is selected at the moment you press export, not the one you looked at earlier.

The JPG 质量 slider is bounded by 60–100(默认 90). Keep it near the default for a first pass, then move one step at a time: each step is visible in the preview, and moving it in large jumps makes it impossible to tell which setting produced the artefact you are trying to remove. Values outside the range are rejected instead of being silently clamped, so the number in the readout always matches what the export will use.

Practical notes

Keep the browser window above 1200 pixels wide while working: below that the right column collapses under the left one and you lose the side-by-side view.

Use the reset control between experiments; carrying state from a previous pass is the most common reason a setting appears to have no effect.

If a control looks unresponsive, check the hint line first: most no-op states are caused by a missing file rather than a broken button.

Export after every meaningful change rather than at the very end, so you still have a known-good file if the next experiment goes wrong.

On a laptop with a scaled display the preview is drawn at device pixel ratio, so text that looks crisp on screen stays crisp in the exported image at the same size.

Compare your result against the limits section: if you are working outside the documented range, the tool may still run but the output quality is not guaranteed.

Long sessions are fine because nothing is uploaded, but reload before switching to a different kind of file so cached state cannot leak into the new pass.

The controls you will touch most often here are 笔刷大小, 马赛克颗粒, 格式, JPG 质量.

Self-check list

Run the workflow once with a real file and confirm the result pane shows content, not the empty state.

Push every slider to its minimum and maximum and confirm the readout follows without an error.

Switch each dropdown and confirm the preview and the export change together.

Export once and reopen the file with a local viewer to confirm it is not truncated.

Reset the workspace and confirm all panels return to the empty state.

Reload the page and confirm no previous result is restored by accident.

FAQ

Q: Why is the export smaller than the original?

A: JPG is lossy; lower quality means a smaller file. Choose PNG for identical pixels.

Q: Can redaction be reversed?

A: No. Pixels are overwritten and the export cannot be restored, which is intended.

Q: Does it work on a phone?

A: Yes, touch drag behaves like a mouse drag; very small boxes are treated as accidental taps.

Q: Do dozens of covers slow it down?

A: No. Each cover stores position, method and size, and repaint replays the list; measured single-step repaint stays under 16 ms up to 100 covers. Beyond several hundred, export and start a fresh image.

Q: Does the file leave my device?

A: No. Everything runs inside the browser; requireNetwork is false and no upload happens.

Q: Which browsers does it run in?

A: Current Chrome, Edge, Firefox and Safari builds; no extension or plugin is needed.

Q: Why does the exported file differ in size from the source?

A: The export re-encodes the result, so size follows the chosen format and quality settings.

Limits

  • No automatic detection of ID numbers or faces; the tool does no OCR and makes no promise about anything outside your boxes.
  • Mosaic and blur weaken detail but are not encryption; mask full sensitive numbers with a bar.
  • Images are never uploaded, written to disk or kept in IndexedDB; refreshing releases memory.

Version and compliance

This build is v1.0.0 on ToolCMS plugin spec 3.19, schemaVersion 2.1 and coreVersion 3.7.4. All processing happens inside the browser, requireNetwork is false and no file leaves the device.

⏫︎