Skip to main content
Known Participant
July 31, 2011
Question

Save images to CameraRoll - iOS

  • July 31, 2011
  • 1 reply
  • 8239 views

Hi, I'm currently using the code below to save a screenshot of my app in Flash AIR 2,6:

var cameraRoll:CameraRoll = new CameraRoll();

var bitmapData:BitmapData = new BitmapData(640,960);

bitmapData.draw(MovieClip(root).stage);

cameraRoll.addBitmapData(bitmapData);

The app is working fine, in fact it saves the screenshot in the iPhone's CameraRoll.

So... the question is "what's the problem?": The problem is that the definition of the saved shot is not very high.

It seems like it has got a low JPEG quality... is it possible? Is there a way to save a more defined image in the CameraRoll?

Thank you all

Brandon

This topic has been closed for replies.

1 reply

Pahup
Adobe Employee
Adobe Employee
August 1, 2011

Could you please send me the the actual stage snapshot(sleep/wake+home button) and the one taken by addBitmapData.

str1=pahup

str2=@

str3=adobe.com

-Thanks

Pahup

Known Participant
August 1, 2011

Hi Pahup, thank you for your reply

You asked me an interesting question: I never compared the iPhone's screenshot (sleep/wake + home button) and the one taken by BitmapData.

They seem identical.

Maybe the problem is connected to my App...

I saw that if my Loader component is small (with a big image loaded) the screenshot has got a very low definition.

If the loader is big, or if the image loaded is small... the screenshot is good.

Have you got any alternative solutions?

Thanks

Brandon

Pahup
Adobe Employee
Adobe Employee
August 1, 2011

I think you should try adding the BitmapData to Camera Roll that you have in memory, instead of try taking the snapshot of the movie clip stage after loading the bitmapdata in a loader.

This way loader wouldn't come play any role.

atleast this is what I understand from your question.

-Pahup