我目前在我的应用程序内部创建了一个Android相机,但是,我在Surfaceview(拍摄图像之前)和拍摄的图像上看到的图像略有不同,因为拍摄的图像被裁剪出。相机预览不同于位图
这里是图像预览拍摄图像前: https://drive.google.com/file/d/0B4vL9wnJulKocGF1ejJxX1c5Qms/view?usp=sharing
,这里是拍摄的图像: https://drive.google.com/file/d/0B4vL9wnJulKoUWREYngxWFk3aXc/view?usp=sharing
这里是相机预览
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:id="@+id/camera_preview"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
</RelativeLayout>
这里的XML文件是捕获图像的XML文件:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:id="@+id/capturedImageHolder"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
任何人都可以帮忙吗? 谢谢
我考虑到了你所说的并实施了一些建议,现在我的图像预览捕获的图像相当准确。谢谢 – BadCodersHub