Is there a reason you're not just using the Java directly?  CF's built
on J2EE specifically for that reason.

cheers,
barneyb

On 12/12/06, Rick Root <[EMAIL PROTECTED]> wrote:
>  From this code:
>
> http://www.jhlabs.com/ip/BoxBlurFilter.java
>
> I'm interested in the following snippet:
>
>         ta += ((rgb1 >> 24) & 0xff)-((rgb2 >> 24) & 0xff);
>         tr += ((rgb1 & 0xff0000)-(rgb2 & 0xff0000)) >> 16;
>         tg += ((rgb1 & 0xff00)-(rgb2 & 0xff00)) >> 8;
>         tb += (rgb1 & 0xff)-(rgb2 & 0xff);
>
> Here's the code I've written in CF.
>
>         ta = ta + 
> BitAnd(BitSHRN(rgbRight,24),255)-BitAnd(bitSHRN(rgbLeft,24),255);
>         tr = tr + 
> BitSHRN(BitAnd(rgbRight,16711680)-BitAnd(rgbLeft,16711680),16);
>         tg = tg + BitSHRN(BitAnd(rgbRight,65280)-BitAnd(rgbLeft,65280),8);
>         tb = tb + BitAnd(rgbRight,255)-BitAnd(rgbLeft,255);
>
> Unfortunately, this isn't working.  Either I've written the code wrong,
> or the original code is wrong.  I don't understand what it's doing at
> all other than it's SUPPOSED to cause a blur by doing something with
> pixels to the left and right of a given pixel.
>
> But the values of ta, tr, tg, and tb are as such:
>
> ta=1275
> tr=66296
> tg=16777994
> tb=957
>
> Obviously... tr and tg are *WAY* out of the array length of the divide
> array, which is 1280 for the blur i'm trying to do (horizontal and
> vertical radius = 2, with 2 iterations)
>
> Clearly, those numbers are wrong... but I don't really know why.
>
> Rick
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:263893
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to