Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float grey = (1.0-saturation) * (ORIG_RED + ORIG_GREEN + ORIG_BLUE) / 255.0 / 3.0;
- RED = 255.0*fmax(0.0,fmin(1.0,pow(fmax(0.0,brightness*(saturation*fmax(0.0,((float) ORIG_RED )/255.0-blackpoint[0])+grey)/whitepoint[0]),(double)contrast)));
- GREEN = 255.0*fmax(0.0,fmin(1.0,pow(fmax(0.0,brightness*(saturation*fmax(0.0,((float) ORIG_GREEN )/255.0-blackpoint[1])+grey)/whitepoint[1]),(double)contrast)));
- BLUE = 255.0*fmax(0.0,fmin(1.0,pow(fmax(0.0,brightness*(saturation*fmax(0.0,((float) ORIG_BLUE )/255.0-blackpoint[2])+grey)/whitepoint[2]),(double)contrast)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement