check out the Camera SDK docs. camera previews are in raw YUV/YCbCr 
format. BitmapFactory won't decode that format.

in the days before 1.5 brought back video recording, various intrepid 
'droiders including me were doing video capture by saving preview 
frames, and the adventures did not always end well. some of us wrote 
raw decoders for the camera format, but mostly concluded that it just 
takes too long on the phone to be viable.

camera previews are really only usable as such IMHO. trying to save 
or encode them seemingly was not anticipated by the SDK implementers.

IIRC, frames can be obtained from recordings made with MediaRecorder. 
i've not used that feature yet, but it can't be more awkward and 
problematic than dealing with the Camera preview format.

hth
j



>I'm using the Camera.PreviewCallback.onPreviewFrame to try to generate
>a bitmap from the byte array passed to that method.  If I use
>BitmapFactory.decodByteArray it returns null.  I'm assuming that the
>array is correctly formatted since the data just comes right from the
>camera, so what could the problem be?


-- 
jason.software.particle

--~--~---------~--~----~------------~-------~--~----~
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