Getting started with Camera Preview and general 2D drawing

All your problems with Audio, Video and Images.

Getting started with Camera Preview and general 2D drawing

Postby pure » Sun Dec 07, 2008 4:40 pm

Hello,

I have been reading and looking at some tutorials on how to get started with 2D drawing and also using the Camera preview. I this correct:

* In my view (extends SurfaceView) i have to create a Bitmap as an off screen image.

* I create an off screen canvas on which i can draw to

* On android.hardware.Camera.PreviewCallback.onPreviewFrame(byte[] data, Camera camera) i draw the data on to the offscreen bitmap but i will need to convert it first because there is a bug that gives native camera data (http://groups.google.com/group/android- ... 3ddc8abf9b)

* On the views onDraw something method i draw the bitmap on to the canvas of my view.

What i would like to have is an application that will show a preview of the camera and draw an overlay image on it. I would also like to be able to just draw part of the preview image on parts of the screen. So for example the top third of the preview on the top third of the screen.

Are there any examples of using PreviewCallback.onPreviewFrame?

Thanx
pure
Freshman
Freshman
 
Posts: 4
Joined: Sun Dec 07, 2008 4:25 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 11 guests