Android Camera Preview is incorrect on Samsung Galaxy S3

霸气de小男生 提交于 2019-12-11 10:28:00

问题


When I load the camera in my app with a Samsung Galaxy S3 on Android 4.0.4, the preview image is just green and fuzzy with horizontal noise. The camera button looks fine. When I take the picture, the saved file looks good. I tested the build in camera app and it works just fine.

This issue does not happen on a Samsung Galaxy S and Motorola Electrify running Android 2.3.

I use Rhomobile for development. Here is a link to the Android camera source code: https://github.com/rhomobile/rhodes/tree/master/platform/android/Rhodes/src/com/rhomobile/rhodes/camera

This is what I get when I bring up the camera:

My setup: - Samsung Galaxy S3 on Android 4.0.4 - Rhodes 3.4.2 - minSDK: 8 - Android SDK: 4.1


回答1:


I fixed this problem by changing my camera setting from:

settings = {:desired_width => 800, :desired_height => 800, :flash_mode => 'auto'} Camera::take_picture(url_for(:action => :camera_callback_new), settings)

to

settings = {:desired_width => 1024, :desired_height => 1024, :flash_mode => 'auto'} Camera::take_picture(url_for(:action => :camera_callback_new), settings)



来源:https://stackoverflow.com/questions/13350490/android-camera-preview-is-incorrect-on-samsung-galaxy-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!