CamanJS icon indicating copy to clipboard operation
CamanJS copied to clipboard

Add channel parameter for greyscale filter

Open letmaik opened this issue 11 years ago • 0 comments

From a given color image I need to display one of its channels as a greyscale image. For that I do something like:

this.channels({
    red: ch == 'r' ? 0 : -100,
    green: ch == 'g' ? 0 : -100,
    blue: ch == 'b' ? 0 : -100
});

However then I cannot use the greyscale filter as the resulting image is too dark. I don't want a weighted average of all channels but instead just use a single channel and make a greyscale image out of it. Is there an easy way to do that and if not, could it be achieved by adding a channel parameter to the greyscale filter?

letmaik avatar Oct 17 '14 11:10 letmaik