I have the following code to generate a bitmap
final byte[] data = dataStream.toByteArray();
BitmapFactory.Options options = new BitmapFactory.Options();
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, options);
It works fine for every image that I have tried on an Android tablet. However on the emulator, an image of size 1280 x 720 never works. BitmapFactory.decodeByteArray always returns a null for this image without generating any exceptions. This makes me wonder if decodeByteArray is “hardware” dependent, and emulator has a limit on Bitmap size that it can handle.
Yes friend, unfortunately the emulator works well with bitmap textures with limit size of 1024×1024. In Mario Zechner’s book ‘beggining android games’, he says that he advises working with textures sizing the max of 512×512 or 1024×1024, accepting its variations.