1

How do I load 8-bit binary image data into an OpenGL ES 2 texture on Android

view story
linux-howto

http://stackoverflow.com – I want to read monochrome image data from disk in a binary format (unsigned byte) and display it as an OpenGL ES 2 texture in Android. I am currently using Eclipse and the AVD emulator. I am able to read the data from disk using an InputStream, and then convert the byte data to int to allow me to use the createBitmap method. My hope was to create a monochrome bitmap by using ALPHA_8 as the bitmap format, but if I do that the texture appears as solid black when rendered. If I change the bitmap format to RGB_565 I can see parts of the image but of course the color is all scrambled because it (HowTos)