Skip to main content
Participant
October 28, 2012
Question

Help with air for iOS camera.

  • October 28, 2012
  • 3 replies
  • 986 views

Hello,

Im building a photo app for the iPhone, iPad.   Thing is, I wasnt able to use CameraUI because I need to overlay elements on top of the photo.  What I wanted to know is if I would be able to save the bytedata as a jpg to the iPhone photo library in some way.  If anyone could point me in the right direction i'd really appreciate it.

Thanks

This topic has been closed for replies.

3 replies

Colin Holgate
Inspiring
October 28, 2012

You can either use CameraUI to get the picture, and then layer things on top of the picture after you have taken it. Or you can use the regular Camera class to get a live video feed, and lay things on top of the image before grabbing it (using a draw function to get the video image and overlay image combined).

Either way, you then go on to save the final image using the CameraRoll class.

m4ss4Author
Participant
October 28, 2012

Thanks, in the cameraroll class I use the

addBitmapData

()

method?

Colin Holgate
Inspiring
October 28, 2012

Yes, something like this:

public static function saveToCameraRoll(bmd:BitmapData){

var cameraRoll:CameraRoll = new CameraRoll();

cameraRoll.addEventListener(Event.COMPLETE,saved);

cameraRoll.addEventListener(ErrorEvent.ERROR,failed);

cameraRoll.addBitmapData(bmd);