Closed marceloinxs closed 11 years ago
Great piece of code :)
I made a little change that I think might be useful to add to the plugin. Sometimes you simply don't want to desaturate the image completely.
Assuming intensity is a plugin variable:
for (; i < length; i += 4) { var k = px[i] * 0.3 + px[i + 1] * 0.59 + px[i + 2] * 0.11; px[i] = Math.floor(k * intensity + px[i] * (1 - intensity)); px[i + 1] = Math.floor(k * intensity + px[i+1] * (1 - intensity)); px[i + 2] = Math.floor(k * intensity + px[i+2] * (1 - intensity)); }
Wow great idea.. I will update my code as soon as possible releasing a new version of the plugin. Thank you so much
The new feature is available in the new release, thank you for your help ;-)
:-D
Great piece of code :)
I made a little change that I think might be useful to add to the plugin. Sometimes you simply don't want to desaturate the image completely.
Assuming intensity is a plugin variable: