# Image Redactor

A dependency-free browser tool for manually covering sensitive regions in static JPG, PNG, or WebP images. It draws opaque rectangles into a newly exported flattened PNG or JPEG; the original remains unchanged.

## Run locally

Requires Python 3 or another static HTTP server. From this directory, run:

```sh
python -m http.server 8000
```

Open `http://localhost:8000/` in a modern browser. ES modules may not work when opening the HTML file directly with `file://`.

## Use

1. Select one JPG, PNG, or WebP image up to 15 MB and 20 megapixels.
2. Drag over each private area, or use the pixel-coordinate fields.
3. Choose an opaque fill color and PNG or JPEG.
4. Export, reopen the downloaded image, and inspect the entire result at full size before sharing.

## Privacy and limits

Image decoding, masks, preview, and export run in the current browser tab. This demo makes no network request and does not upload the source file. The output canvas paints masks directly over source pixels and exports a flattened image.

There is no OCR, automatic PII detection, face detection, metadata certification, or forensic guarantee. The user must select every region and verify the complete result. A mask covers only its rectangle; repeated details or surrounding context may remain. JPEG export may alter image quality, and PNG may be larger. This tool is not for legal, medical, or other certified redaction.

## Files

- `index.html`: standalone responsive demo
- `app.mjs`: UI entry point
- `image-redactor-ui.mjs`: shared pointer, coordinate, preview, and export workflow
- `image-redactor-core.mjs`: validation, coordinate mapping, mask drawing, and output filename helpers
- `LICENSE`: MIT License
- `VERSION`: 0.1.0
- `favicon.svg`: local icon

## License

MIT. No third-party runtime dependency is included.

