I have a linear byte array whose values I want to set as pixels of an image. The byte array length is 4800 and I want it to be displayed as a 80×60 image with pixel values set row-wise one after the other. I know that BitmapFactory helps to handle such tasks but how do I specify the height and width of the image?
Share
It sounds like what you’ve got is a byte array with the colors for the pixels in a Bitmap. If so, you will probably want to use the setPixels() method: