views:

103

answers:

0

I have a camera app, in it's simplest state it's nothing more then the cameraPreview example with some 'takePicture' code. The link to the example online is for 2.0, and i'm developping against 1.5 (API lvl 3), but still, here it is: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html

The biggest difference with the old version is the whole "getOptimalPreviewSize" thing. Everything is done landscape.

Now the problem is: i have a preview, but when i take the picture there is more information on that picture then there is on the preview. The top and bottom show stuff that wasn't visible on the preview.

Now i am going to put an overlay on top of the preview, to align the object in the picture with something. If the picture is taken, the whole thing gets squeezed a bit, and i'm all out of alignment :(.

The camera app on the system doesn't have this problem, so it must be possible to fix this. Any thoughts?

If i must manually set the preview and/or picture size, i'll have trouble with different handsets i guess, and because there are a lot of function only since API lvl 5 (e.g.: getOptimalPreviewSize), I can't use these.