Advertisement
Guest User

Untitled

a guest
Aug 6th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. float grey = (1.0-saturation) * (ORIG_RED + ORIG_GREEN + ORIG_BLUE) / 255.0 / 3.0;
  2. 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)));
  3. 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)));
  4. 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