meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 404 forks source link

Luminance differs between Calculate.luminance and Filter.threshold #155

Open mknecht opened 10 years ago

mknecht commented 10 years ago

Calculate.luminance() calculates a differing luminance than Filter.threshold(), rendering either one of them unusable if used in combination.

https://github.com/meltingice/CamanJS/blob/master/src/core/calculate.coffee#L27 https://github.com/meltingice/CamanJS-Plugins/blob/master/src/threshold.coffee#L3

Please use the former in the latter. Cost me quite a bit of time to notice differing luminance calculations.