// Copyright 2003-2005 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. transition "Flashframe" group "Too Much Too Soon" input bl, "Blur Amount", slider, 50, 0, 100 input bt, "Blur Type", Popup, 2, "Post blur", "Pre Blur", "Both Blurs", "No Blur"; input ml, "Max Luma", slider, 100, 0, 120 code float w,h; dimensionsof(dest,w,h); image buf[w][h]; float i,clut[256]; clut += ml/120; if (ratio <= 0.5) then if (bt==2||bt==3) then blur(src1,buf,bl*ratio/2,aspectof(dest)); src1=buf; end if; repeat with i = 0 to 255*(1-ratio*2); clut[i] = i/(255*(1-ratio*2)+1) if clut[i] > ml / 120 then; clut[i] = ml /120; end if; end repeat; levelMap(src1, dest, LinearRamp, clut, clut, clut); if (bt==1||bt==3) then blur(dest,buf,bl*ratio/2,aspectof(dest)); dest=buf; end if; else if (bt==2||bt==3) then blur(src2,buf,bl*(1-ratio)/2,aspectof(dest)); src2=buf; end if; repeat with i = 0 to 255*2*(ratio-0.5); clut[i] = i/(255*2*(ratio-0.5)+1) if clut[i] > ml / 120 then; clut[i] = ml /120; end if; end repeat; levelMap(src2, dest, LinearRamp, clut, clut, clut); if (bt==1||bt==3) then blur(dest,buf,bl*(1-ratio)/2,aspectof(dest)); dest=buf; end if; end if;