// Copyright 2003 Matt Sandstršm/Too Much Too Soon // This script is freeware, meaning you may copy and // distribute it free of charge, as long as it's kept intact, // including this message. Feel free to use the code as // inspiration for your own scripts, but don't steal. // Email me at mattias@beauty.se if you have any questions. // Thank you. Have fun. filter "Shadow/Highlight Gamma"; group "TMTS Color"; input sg, "Shadow Gamma", slider, 1, 0.01, 4 detent 1; input hg, "Highlight Gamma", slider, 1, 0.01, 4 detent 1; InformationFlag("YUVaware") code float i, format, clut[256] format = GetPixelFormat(dest) repeat with i = 0 to 127 clut[i] = power(i/127, sg)/2; clut[i+128] = power(i/127, hg)/2+0.5; end repeat; if (format != kFormatYUV219) ConvertImage(src1, src1, kFormatYUV219); end if levelMap(src1, dest, LinearRamp, clut, LinearRamp, LinearRamp);