It includes: black and white, saturation, brightness, color shift, and invert.
I am unsure if my saturation function is correct, it appears to have a similar result to other saturation functions out there.
Code: Select all
r, g, b ,a = imageData:getPixel(i, j)
avg = (r+g+b)/3
r = math.max(0, math.min(255, avg+(r-126)*saturation))
g = math.max(0, math.min(255, avg+(g-126)*saturation))
b = math.max(0, math.min(255, avg+(b-126)*saturation))