Log in or register to post comments

Get Bitmap from texture

September 10, 2013 - 10:51pm #1

i wanted to get bitmap from the texture i previously created from bitmap so that i do not have to cache the bitmap seperately.

Tex is a texture which is being used in the app imagetargets.

Bitmap bit = BitmapFactory.decodeByteArray(tex.getData(), 0, tex.getData().length);

I used this code. This returns null because it could not be decoded. I printed the tex.getadata before this and it has some value which indicates that the tex has data that can be decoded into bitmap right? I do not understand what is wrong

Log in or register to post comments