Skip to main content
Inspiring
November 16, 2015
Question

Android limit of 8,191px bitmapdata .. not an issue on iOS [HELP]

  • November 16, 2015
  • 1 reply
  • 1103 views

I'm creating some bitmaps that are larger than 8,191 pixels. Everything works fine on iOS...  even 20,000 pixels and above..  on Android anything over 8,191 hangs my app.

Does anyone have experience with this or know of a workaround?  Had to completely remove a feature from my Android app because of this. 

This topic has been closed for replies.

1 reply

November 16, 2015

According to the Adobe ActionScript 3 documentation (linked below and possibly not up to date since it references AIR 1.5 specifically), a DisplayObject cannot have more than 16,777,215 pixels ( 4096*4096 - 1, 2048*8192 - 1, 1024*16382 - 1) contained within it. Depending on how wide your images are, over 20000 pixels tall (838px wide in that instance) seems like it is possible according to the docs. But the version of OpenGL Android uses is different per Android OS version, and the capabilities change based on the version. So you may need to look into what the limitations are of the Android device and OS you are testing with to know what you can do. It could be a memory issue or it could be an image size limit of the Android device you are testing with.

Question. Why are you needing to create images that big in size? If you really do, you could split them up into multiple images and have the X/Y positions place the second image directly after the first.

DisplayObject - Adobe ActionScript® 3 (AS3 ) API Reference

http://developer.android.com/guide/topics/graphics/opengl.html

Applauz78Author
Inspiring
November 17, 2015

The reason I need to capture an image that large is because its an image of a massive visual checklist... bitmapdata gets passed to a social ANE to share on Facebook, iMessage, etc.

Projectitis
Inspiring
November 19, 2015

Normally in these situations you would create several smaller bitmaps and tile them (but them inside a Sprite, for example).

If flash still won't let you do this because the total width/height exceeds the limit, then you'll need to add/remove them from the display list as the user scroll to view it.

However - it's not going to help though if you need to pass that BitmapData around (to the ANE you mention). Can you scale it down (BitmapData.draw) to a smaller bitmap before passing it to the ANE, or does it need to be that big?