Why camera native extension for iOS?

Adobe AIR has its limitations, when it comes to control over an iPhone or iPad camera functions, such as focus, exposure and white balance. This Camera Native Extension offers an API for accessing these functions and adds options for applying filters for cropping and rotating frames. Dig in.

Where’s the code?

April 2014 update: We have turned this project into a step-by-step tutorial with complete source code. Check it out on our new website, EasyNativeExtensions.com.

What does it do?

The Extension allows you to capture static frames from the iPhone/iPad video camera at a frame rate and resolution, chosen by you.

You have the option to lock the focus, exposure or white balance or to have them done automatically by the camera. You can also set a point of interest to expose for or to focus on.

The extension also allows you to rotate, crop or translate frames, as they come in.

Here is a brief video demonstration:

Are there examples with code?

Of course, there is a Wiki page full of them: Examples on how to use the Native Camera Extension.

How do you build the extension?

The extension code comes with ANT and bash scripts, which automate the building process. For more information see our previous blog post One-step build: AIR mobile project with an iOS native extension.

ActionScript 3 API for the extension

The extension exposes the following API at the moment. Click on a function name to see a detailed explanation or go to the Native Camera Extension API Wiki page:

Want more?

This extension hooks into the video stream and extracts frames as they come in. It can be extended with functionality to take static photos or to save video files, if there is interest.

What would you like to see it do next?

Leave a comment below or get in touch via support@diadraw.com.

Want more functionality and Android support?

Check out our DiaDraw Native Camera Driver.

It comes with a special offer until December 31st 2014: get any edition of the DiaDraw Native Camera Driver and receive a free copy of our Easy Native Extensions book, Padawan Package.

About the Author

Radoslava is co-founder of DiaDraw. Prefers to communicate with images. Verbal communication always caused trouble with her parents. Started speaking Basic early on, followed by four years of Delphi, six years of C++, four years of ActionScript, lately converses in Objective-C. Her mum and dad hope she'll start speaking human at some point.