tags:

views:

54

answers:

1

I am trying to display a filtered version of the camera preview. The code runs without errors but the device is showing the preview instead of the generated bitmap.

This is the code for my (very small) Activity: http://code.google.com/p/ruellia/source/browse/ruellia/src/br/com/ximp/ruellia/RuelliaActivity.java

I suspect the view layering and the surface holder type, but so far no luck... anyone?

A: 

I'm trying to do the same thing. There seem to be a lot of issues with Android around this stuff. See my answer here for some details.

In addition to the challenges with getting the NV21 decoded, I have also found that only some of the Bitmap.createBitmap() methods actually return valid bitmaps that can be drawn to the surface. In the debugger, you can tell that sometimes you get a bitmap back that has mHeight == -1, which I think will not work.

I have also found that ImageView#setBitmapImage() does nothing while View#drawBitmap() works.

Chinasaur