-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saturation module acting weird #1845
Comments
It's very uncertain as the filter works perfectly for
|
Hmm, I agree it looks wrong over 1.0! Thanks for catching that!!
…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: