silvia-odwyer / photon

⚡ Rust/WebAssembly image processing library
https://silvia-odwyer.github.io/photon
Apache License 2.0
2.72k stars 154 forks source link

Add selective colorization #143

Closed osman-turan closed 2 years ago

osman-turan commented 2 years ago

This PR adds selective colorization effect by replacing the commented-out implementation. Please note that the new implementation mixes the colors of matched pixels rather than the reference color compared to the old implementation. Mixing with the reference color produces hard transitions around matched area boundaries whatever fraction value is provided. The new implementation helps smooth transitions around matched areas with low fraction values.