BitmapFactory.decodeByteArray problem

Put your problem here if it does not fit any of the other categories.

BitmapFactory.decodeByteArray problem

Postby arunjith » Thu Jan 17, 2008 10:47 am

Hi all,

I have a raw rgb file with me , where each frame data is (240 * 200 * 2) (width * height * each pixel has 2 byte ).
I am reading this much data each time and passing to BitmapFactory.decodeByteArray

I am using the following function in BitmapFactory static class to decode the buffer into bitmap
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. decodeByteArray(byte[] imageData, int offset, int length, int preferredWidth, int preferredHeight)
Parsed in 0.013 seconds, using GeSHi

usage is as follows
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. image = BitmapFactory.decodeByteArray(readBuffer,0,240*200*2 ,240,200);
Parsed in 0.010 seconds, using GeSHi

but what the function returns is a null image

can anyone guide me where I'm facing the problem
Posts: 7
Joined: Fri Jan 11, 2008 12:53 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 4 guests