everestpipkin / image-scrubber

A friendly browser-based tool for anonymizing photographs taken at protests
https://everestpipkin.github.io/image-scrubber
MIT License
939 stars 82 forks source link

Fix information leak from partial-alpha blur #14

Closed mewo2 closed 4 years ago

mewo2 commented 4 years ago

The current blur routine builds a masked version of the image, blurs it, then overlays it on the original image. This means that near the edges of the mask, the blur is applied with <100% opacity, leaving some information visible if you tweak contrast etc.

This PR changes that process to blurring the whole image, and then masking out the relevant parts, meaning that anything in the brush area is blurred fully.

(this also gets rid of the "halo" effect around blurs)