meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation

Home Page:http://camanjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Luminance differs between Calculate.luminance and Filter.threshold

mknecht opened this issue · comments

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.