Turns out I was doing things "right" but I had a typo which was screwing
up my numbers...
I wrote a couple of little UDFs to remove the "complicated" code from
the rest of my code.. not that trying to blur images is easy, but at
least I can take this part out of it.
<cfscript>
function separateRGB(rgb)
{
// takes java 32 bit RGB value and separates it
// into alpha, red, green, and blue
var retVal = structNew();
retVal.rgbAlpha = BitAnd(BitSHRN(rgb,24),255);
retVal.rgbRed = BitAnd(BitSHRN(rgb,16),255);
retVal.rgbGreen = BitAnd(BitSHRN(rgb,8),255);
retVal.rgbBlue = BitAnd(rgb,255);
return retVal;
}
function combineRGB(a,r,g,b)
{
// takes 8 bit integer values (0-255) for alpha, red
// green, and blue, and converts it to a 32 bit
// RGB value that java likes.
var rgb = 0;
var rgbA = BitSHLN(a,24);
var rgbR = BitSHLN(r,16);
var rgbG = BitSHLN(g,8);
var rgbB = b;
rgb = bitOr(bitOr(bitOr(rgbA,rgbR),rgbG),rgbB);
return rgb;
}
</cfscript>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263865
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4