I'm trying to write a fast but heavily involved image processing filter for both mobile and desktop, as a Flash Builder project.
Is there a way to compile a native C module for each of the platforms -- Android, iOS, Windows, Mac, Blackberry -- and then link that efficiently to the Flash part of the app?
It would be a Flash app that calls an image processing function to regenerate the preview image whenever the parameters change, and then to create the final image.
If that's not possible, please help me understand (since I'm completely new to Flash) if ActionScript itself is fast enough for pixel-by-pixel processing of a large camera image on a mobile device. How much slower would it be than C?
You can call native code from AS3 by writing an AIR Native Extension (ANE):
BTW: Flash already contains quite a few image processing filters and image compositioning algorithms. They may be suitable, depending on your needs.
Thanks. I'm trying to create a new filter that's very involved; maybe some of the built-in stuff can be used along the way to save time, but there will surely be a lot to do with fast low-level code.
Was reading around and someone developing a chess algorithm claims that ActionScript was hundreds of times slower than C for that, so I 'spect part of this will have to be done via these native extensions. Thanks again.