Zverik / leaflet-grayscale

Grayscale TileLayer for Leaflet
106 stars 37 forks source link

Support multiple channels #2

Closed tmcw closed 8 years ago

tmcw commented 11 years ago

Most 'photo-style' grayscale filters use luminance or another factor rather than a mean of all bands.

Zverik commented 11 years ago

I... don't understand this. I used a line from OpenLayers example, which uses l = 0.325 * r + 0.5 * g + 0.125 * b formula. Are you suggesting that canvas' pixels aren't always rgba?

Zverik commented 11 years ago

For a future reference, a slashdot article on the subject with different coefficients.