subtype idKGScriptParserduration?ð framebaseencodingparms inputFormat inputCountpublic keycolourtitle key colouruitypetypedefaultÿÿÿÿvalueÿÿÿÿurlwww.fxscript.org stringsoftness thresholdminmaxCCpCp edgefeatherradiusDz@ @ rampB¾useoriginalcoloursUse Original Colours glowcolour1 glow colourÿÿÿÿÿÿÿÿ compositemodeComposite Modeuiinfolabelsmattescreenmultiplyoverlayadd?€@ @ @ amountamountCúB B !B privatestaticsscript ø//stib's glow. A filter using the RGBcolourKey function to do a cheap n cheerfiul glow on a user defined colour //Copyright 2004 stephen dixon //This filter is freeware, released under the GPL license. //You can do what you want with it as long as you leave it unencoded and include this message. filter "colour glow" group "stib's filters" producesAlpha; input KeyColour, "key colour", Color, 255, 255, 255, 255 input url, "www.fxscript.org", Label, "string" input softness, "threshold", slider, 240, 0, 255; input edgefeather, "radius", slider, 5, 0, 1000 ramp 95; input UseOriginalColours, "Use Original Colours", CheckBox, 0 input glowColour1, "glow colour", Color, 255, 255, 255, 255 input CompositeMode, "Composite Mode", Popup, 5, "matte", "screen", "multiply", "overlay", "add" input amount, "amount", slider, 80, 0, 500 ramp 80 Code UseOriginalColours = !UseOriginalColours amount /= 100 softness = 255-softness float w,h; //float CLUT_a[256], CLUT_r[256], CLUT_g[256], CLUT_b[256]; //color KeyColour dimensionsof(dest,w,h); image buf1[w][h], buf2[w][h]; //select the highlight area to become our glow //using a colour key with black //KeyColour = {0,0,0,0} RGBColorKey(src1, buf1, KeyColour.r, softness, KeyColour.g, softness, KeyColour.b, softness, softness, 1) Invert(buf1, buf1) //fill the rgb channels of our key image with either our glow colour or the src image colour if UseOriginalColours ChannelFill(buf1, kNone, glowColour1.r, glowColour1.g, glowColour1.b) else ChannelCopy(src1, buf1, Knone, kRed, kGreen, kBlue) end if; //feather our glow as user desire blur(buf1, buf2, edgefeather, aspectof(dest)) if CompositeMode == 1 //matte Matte(buf2, src1, dest, amount, kAlpha)//matte amount-=1 repeat while (amount > 0) Matte(buf2, dest, dest, amount, kAlpha) amount-=1 end repeat else if CompositeMode == 2 Screen(src1, buf2, dest, amount, kAlpha)//screen amount-=1 repeat while (amount > 0) Screen(dest, buf2, dest, amount, kAlpha) amount-=1 end repeat else if CompositeMode == 3 Multiply(src1, buf2, dest, amount, kAlpha)//mult amount-=1 repeat while (amount > 0) Multiply(dest, buf2, dest, amount, kAlpha) amount-=1 end repeat else if CompositeMode == 4 Overlay(src1, buf2, dest, amount, kAlpha)//overlay amount-=1 repeat while (amount > 0) Overlay(dest, buf2, dest, amount, kAlpha) amount-=1 end repeat else if CompositeMode == 5 Add(src1, buf2, dest, amount, kAlpha) amount-=1 repeat while (amount > 0) Add(dest, buf2, dest, amount, kAlpha) amount-=1 end repeat end if name colour glowscriptid>groupstib's filters producesalphaencoded