> because in the sample java code the bytearray wasn't used
> directly. they used it as follows
> ...
> the bytearray imageBuffer1 was created this way before
> passed to the function to capture the image.

Hmm.. if all the function does is populate a supplied byte array, then it 
sounds like you just need to create a BufferedImage, the same way it is done in 
the java example. 

The parameters will vary. So use whichever ones are your java example. But the 
general idea is something like

<cfset BufferedImage = createObject("java", "java.awt.image.BufferedImage")>
<cfset imgRegistration1 = BufferedImage.init(width, height, 
BufferedImage.TYPE_BYTE_GRAY)>
<cfset raster = imgRegistration1.getRaster()>
<cfset imageBuffer1 = raster.getDataBuffer().getData()>

... call function to populate the byte array ...

Once you have the populated BufferedImage, you can do whatever is needed. Pass 
it into ImageNew(...) to create a CF compatible image, etcetera.

-Leigh


      

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326304
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to