Jump to content


FYI - blitMask + iPad3 + AIR cannot play together

Recommended Posts

So it's been a hectic few weeks trying to solve this.. I have confirmed that AIR cannot do a bitmap capture on iPad3 because the resolution is way too high. It will not capture the screen at 2048 x 1536. It will only capture 1024 x 768 and then scales it up.


So when trying to use blitMasking on the iPad3 you notice that when bitmapMode = true the image quality is drastically reduced.


I guess we have to wait for Adobe to release a fix in a future AIR release :(

Link to comment
Share on other sites

Ah, okay. Thanks for reporting back. I'm curious, though, what would happen if you change the _gridSize variable inside BlitMask so that it limits itself to only capturing 768x768 chunks (thus not exceeding Adobe's cap). Currently it is set to 2880 (well, actually, the grid value needs to be one less than the max, so it's 2879). So basically, crack open BlitMask and change this:


protected var _gridSize:int = 2879;



to this:

protected var _gridSize:int = 767;


Again, just curious.

Link to comment
Share on other sites

Not sure how that would make a difference though.


2879 is actually higher than the width of a fullscreen iPad3 .. so it should work. It's something with AIR.


Even when using a stageWebView in AIR and taking a snapshot of it .. the image is 1/2 size. I think its just a bug.

Link to comment
Share on other sites

I thought you said that AIR won't allow a capture above 1024x768. BlitMask will go through and create a grid of captures so that no single BitmapData is larger than that _gridSize variable (square). So you could have a massive image and it'd just break it down into chunks internally. It's transparent to you, though - it juggles all that stuff automatically so that the correct pixels get displayed at the right time.

Link to comment
Share on other sites

no no ..


Let me explain the test I just tried.


make a project at 1024 x 768


place a retina sized image on the stage 2048 x 1536 .... scale that image 50% to 1024 x 768




This is what is done to accomplish retina graphics on the iPad3




Now when the blitMask captures the image.. its capturing 1024 x 768 as is. Its not actually capturing all the pixels of 2048 x 1536


So when its displayed on an iPad3 .. the iPad3 is taking that 1024 x 768 capture and scaling it up to 2048 x 1536

Link to comment
Share on other sites

But you're not actually scaling anything in your project, right? I though that's what you said. What I'm confused about is why the non-BlitMask version is able to be full-resolution but not the BlitMask version. Have you tried using scaling to your advantage by wrapping your content in a container that is twice the size or something so that BlitMask's capture is double resolution, thus when AIR does its funky scaling of the data, it ends up at 100% resolution rather than 50%? Just an idea.

Link to comment
Share on other sites

This happens because the image in the the application is scaled down by 50% ... but when loaded on the iPad3 it scales back up. All the pixels are there. Its live data. ...


When you scale an image down by 50% and then take a picture of it.. you are not going to capture all the pixels and its no longer live data. Its a photo.


Its like ... if I go on the internet and search for an image thats 5000 x 5000 and in my browser I'm looking at it scaled to 100 x 100 .. if I take a screenshot of that image I can not blow it back up to 5000 x 5000


This is what is happening.


Its not noticeable on the iPad2 ...



another problem I am seeing is that when blitMask captures the image .. the image is so large that it crashes the iPad. Remember that 3 second delay I was telling you about. Well about 80% of the time .. it crashes the iPad when the capture takes place. The log in Xcode is that the iPad crashed due to low memory.


So the blitmask capture is killing the memory of the iPad.

Link to comment
Share on other sites

Yep, I understood exactly what you were explaining about the scaling - that's why I was proposing counteracting that, but as you mention, you're running into a memory issue because your content is so huge. Therefore it isn't worth even trying the scaling thing because that would require even more pixels and memory. Oh well.

Link to comment
Share on other sites

Moral of the story. Apple has screwed everyone with this screen that the world wasn't ready for.


Websites are screwed up on it

Video is screwed on it

AIR can't support it properly.



I've also noticed on the iPad3 that memory management is horrible. The exact same IPA with retina graphics is impossible to crash on the iPad2 .. but crashes a lot on the iPad3.


I think the amount of RAM given to the developer on the iPad3 is a lot less than what you get on the iPad2.


I love Apple .. but this is very annoying.

Link to comment
Share on other sites

  • 1 year later...

Can anyone confirm if this was the case? I was hoping to use Blitmask for an iPad app aimed at mainly iPad 3. My initial tests are working well on the iPad 2 but if will be a complete show stopper if it is sluggish on the iPad 3.


This post doesn't appear to have been updated in some time.



Link to comment
Share on other sites

I'm not aware of any persistent problems in this regard, but I also cannot verify that it works (I don't work with AIR generally). If anyone else can chime in who has experience in this regard, please do.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.