开发者

Flex4/AIR with NativeProcess: How to pass an image to the native process?

I am trying to make an AIR application, that needs to pass an image (.jpg/.png) to a C++ app, that does number crunching.(this needs to be done very often, like every 2-3 seconds.) I've managed to pass the image by saving it to disk via AIR, then opening this file with the C++ program (and passing the filename as an argument to the C++ program), but this method is really slow, because it involves lots of disk I/O.

Is there a method to send an image directly to a native process?

Edit: There is a good Flash-C++ communication example at http://www.marijnspeelman.nl/blog/2008/03/06/face-detection-using-flash-and-c-revisited/ using sockets. The big problem w开发者_Python百科ith this method is, that some firewall settings can block the communication (i get a windows firewall warning, when i start the app).


There are several ways to transmit data between two processes. One of the most efficient, and easy to setup, is to use TCP sockets. It means that your C/C++ will for (TCP/HTTP) requests, and that your AIR program will send the request with all data inside.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜