// Copyright 2002 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 "Black Restore"; group "TMTS Color"; input lv, "Level", slider, 30, 0, 100; input sm, "Smooth", slider, 50, 0, 100; code float i, clut[256] repeat with i = 0 to (sm+1) * lv / 100 clut[i+lv*(1-sm/100)] = i/255/(sm+1)*100; end repeat; repeat with i = lv+1 to 255 clut[i] = i/255; end repeat; levelMap(src1, dest, LinearRamp, clut, clut, clut);