So that means I cannot decode continuous frames of data to bitmap
in PreviewCallback because data is encoded in raw YCbCr which cannot be
decoded.The only way I can do this is using onPictureTaken method of
PictureCallback where data is encoded in jpeg format which can be easily
decoded.

This is however a slow process and I really wish that preview frames could
be decoded.

Below link demonstrates how a user decodes the YUV byte[] buffer from the
preview
callback and converts it into an ARGB_8888 int[] buffer
http://groups.google.com/group/android-developers/msg/d3b29d3ddc8abf9b

There is also an issue that discusses about applying setPreviewFormat() to
set PixelFormat.JPEG at
http://code.google.com/p/android/issues/detail?id=823

I would really appreciate if anyone could decode the YUV byte[] buffer from
the preview
callback and converts it into bitmaps.


On Wed, May 27, 2009 at 12:19 PM, Jason Proctor
<[email protected]>wrote:

>
> sorry man, the data from the camera preview is encoded in raw YCbCr
> from the camera hardware, it's not readable in any sensible time
> frame by anything available in the Android SDK.
>
> Sujay has the wrong end of the stick again, he's talking about the
> image that's captured when the camera actually takes a picture.
>
> the preview data is in a completely different format and is not
> directly usable. ask me, i tried it :-)
>
> hth
> j
>
>
>
>
> >Does anyone know how to decode the camera data from the
> >PreviewCallback? I need to capture camera preview frames and process
> >the bitmap obtained by decoding the frames before displaying.
> >
> >
> >
> >
>
> --
> 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