【发布时间】:2019-07-04 14:49:53
【问题描述】:
我在这里使用三星 J1 设备时遇到问题。 但是拍摄的图像比预览的要大。
这是最终的位图结果:
我用这个属性调用相机视图:
<com.otaliastudios.cameraview.CameraView
android:id="@+id/camera"
app:cameraGesturePinch="zoom"
app:cameraFlash="auto"
app:cameraAutoFocusResetDelay="0"
app:cameraGestureTap="focusWithMarker"
android:keepScreenOn="true"
app:cameraPreview="glSurface"
app:cameraPictureSizeSmallest="true"
android:adjustViewBounds="true"
app:cameraGestureScrollHorizontal="exposureCorrection"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
我已经尝试使用 4:3 的 cameraPictureSizeAspectRatio 但没有成功。
我是不是做错了什么?
【问题讨论】:
-
您需要询问该库的开发人员。如果您忽略绿色括号,它在我看来就像预览和照片匹配。该库是否记录在括号中标记的区域?
-
不,括号现在没用了。由于不匹配,请查看底部 GitHub 徽标所在的预览。并查看位图本身
-
在预览中,右下角显示“About”的前3.5个字母,在叠加层之下。照片中,右下角显示了“About”的前3.5个字母。
-
是的,问题是图片的高度
-
我也不知道是不是AspectRatio问题
标签: android camera camera-view