Hi Folks,

I am trying to figure out how to create a Bitmap from a pixel array of
bytes representing pixel value.

==========================================================
Bitmap myBitmap = BitmapFactory.decodeByteArray (compressedByteArray,
offset, compressedByteArray.length);

Bitmap mBmap = Bitmap.createBitmap(width, height,
Bitmap.Config.ALPHA_8);
==========================================================
>From what I read, I assume that
- BitmapFactory.decodeByteArray( ) is only for data to be decoded and
returns null from my input array.
I alose found
- public static Bitmap createBitmap (int[] colors, int width, int
height, Bitmap.Config config) but it takes int as input and not bytes.
Each channel is usually coded between 0 and 255.

Thanks in advance,
STN

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to