|Camera preview to an invisible SurfaceView||Boshik||12/19/08 7:35 AM|
Is it possible to capture camera snapshots to bitmaps WITHOUT creating
a visible surface view? All samples I saw over internet uses camera
preview directly to a surface view and the surface view underneath
must be visible.
I need a way to capture camera images in the background and only then
show captured images somewhere on the screen. Is it possible?
|Re: Camera preview to an invisible SurfaceView||Mark K||12/19/08 8:46 AM|
I don't think this is possible. Doesn't seem like Android supports
'headless' graphics implementations.
|Re: Camera preview to an invisible SurfaceView||blindfold||12/19/08 12:54 PM|
> Is it possible to capture camera snapshots to bitmaps WITHOUT creatingJust do not use setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS) and
the preview remains invisible. (The surface view itself may be
visible, but now without the camera preview, so you have full control
over what you display.)
Yes, my app at http://www.seeingwithsound.com/android.htm does exactly
Without the SURFACE_TYPE_PUSH_BUFFERS, the preview callback will still
give you the (header-less) image data that you can use to fill a
Bitmap, although you must use your own (very slow, pixel-by-pixel)
preview decoder for that because Android SDK 1.0r2 is still lacking
any support for preview decoding. The bitmap can then be drawn to a
Canvas for display at any size and anywhere on the screen.
|Re: Camera preview to an invisible SurfaceView||Boshik||12/20/08 1:37 AM|
Thank you very much! Now it works! in the emulator BUT on my G1 it
shows only black screen.
The problem possibly caused by using GLSurfaceView (from the API
Demos) as a preview surface. Is it possible to avoid that?
> Yes, my app athttp://www.seeingwithsound.com/android.htmdoes exactly
|Re: Camera preview to an invisible SurfaceView||blindfold||12/20/08 2:04 AM|
> The problem possibly caused by using GLSurfaceView (from the APIDon't know, I use a SurfaceView but no OpenGL, so maybe the hardware
acceleration and buffers on the G1 make the difference when using
OpenGL. I have no experience with that.