For anyone interested: The problem is there on a 1.5 G1, but not on a 2.1 Milestone/Droid. It might be the handset or the OS version, which i don't know.
The basics of the problem as far as I can see, is that the preview is returned in 2:3 (320:480), and the picture will be in 3:4 (1536x2048). Using a scaling-factor I can at least predict _how_ the picture will change. On the milestone/droid the numbers for the preview are 480:640, which is also 3/4, so the scaling issue is non-existent. I tried setting the preview to something 3:4, but as the allowed preview sizes are limited, and I can't get them with the API lvl 5 memberfunction, I didn't get very far (and haven't tried that much). On Jul 18, 3:33 pm, EnnaN <[email protected]> wrote: > I could really use some help on this. I have not provided any code, as > I'm hoping it is something more abstract, like limitations on the > preview size vs. what the camera sees. But for what it's worth: > > XML: > <?xml version="1.0" encoding="utf-8"?> > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ > android" > android:orientation="vertical" android:layout_width="fill_parent" > android:layout_height="fill_parent"> > > <my.Package.mySurfaceView > android:id="@+id/myView" android:layout_width="wrap_content" > android:layout_height="wrap_content" /> > </LinearLayout> > > the surfaceview is almost equal to the camerePreview.java code from > the examples: the 1.5 version, not the 2.0 version with the > "getOptimalPreviewSize" code. > > I can't seem to put my finger on why there is more information in the > shot then i see in the preview :( > > On Jul 16, 9:01 pm, EnnaN <[email protected]> wrote: > > > I am hoping that there is something predictable i'm doing wrong, but i > > seem to have more "info" on picture then on the preview. > > > Situation: > > I have an app basically based on the CameraPreview code. (1.5!) > > When I take a picture, the resulting image has more content then i saw > > on the preview. > > To clarify: > > Say i'm looking at something with lines, and while looking at the > > preview i see line 4 to 10. After taking the picture it suddenly is > > clear i've shot lines 5 to 11. I'm trying to sync something I draw > > ontop of the view (a line-drawing) with what i'm photographing, and I > > can't get it to match like this. > > > The newest example has some extra code involving > > "getSupportedPreviewSizes". I can't use this because of the API > > version: I'm coding for min. 3, and that one is from 5. > > > How can I make sure that what i see on the preview is also what i see > > on the picture? > > -- 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

