You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's very uncertain as the filter works perfectly for saturation values <= 1.
I tried to get it to work by converting the image to HSV format from RGB and then explicitly changing the saturation value in the S parameter, before it can be converted to RGB again, but still I only could get it to work till value = 1.
function changePixel(r, g, b, a) {
var hsv = RGBtoHSV ([r,g,b]);
hsv[1] *= parseFloat(options.saturation);
var rgb = HSVtoRGB([hsv[0], hsv[1], hsv[2]]);
return [Math.round(rgb[0]), Math.round(rgb[1]), Math.round(rgb[2]), a];
}
On Tue, Mar 16, 2021, 9:00 AM Mohammad Warid ***@***.***> wrote:
It's very uncertain as the filter works perfectly for saturation values
<= 1.
I tried to get it to work by converting the image to HSV format from RGB
and then explicitly changing the saturation value in the S parameter,
before it can be converted to RGB again, but still I only could get it to
work till value = 1.
function changePixel(r, g, b, a) {
var hsv = RGBtoHSV ([r,g,b]);
hsv[1] *= parseFloat(options.saturation);
var rgb = HSVtoRGB([hsv[0], hsv[1], hsv[2]]);
return [Math.round(rgb[0]), Math.round(rgb[1]), Math.round(rgb[2]), a];
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1845 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6JYBVB5YWW65JSAKNATTD5JARANCNFSM4ZBR7S6A>
.
I think this doesn't look right - can anyone confirm?

The text was updated successfully, but these errors were encountered: