[英]Sample code for using camera digital zoom in Android-app?
需要设置缩放以进行相机预览...
The ZXing app does zooming. ZXing应用程序会进行缩放。 Check around line 340
检查340行
http://www.google.co.uk/codesearch/p?hl=en#z3Vnz2tRCuY/trunk/qrcode-scanner-live/android/src/com/google/zxing/client/android/CameraManager.java&android.hardware.camera%20lang:java&l=338 http://www.google.co.uk/codesearch/p?hl=zh_CN#z3Vnz2tRCuY/trunk/qrcode-scanner-live/android/src/com/google/zxing/client/android/CameraManager.java&android.hardware。 camera%20lang:java&l = 338
I'm pretty sure the zxing code wont work on the Samsung Galaxy. 我很确定zxing代码在三星Galaxy上无法使用。 The Camera.getParams() it returns do not contain any "zoom-supported" item.
它返回的Camera.getParams()不包含任何“缩放支持”项。
Nor are there any "max-zoom" or "taking-picture-zoom-max" params on my Samsung Epic (a Galaxy S family model). 我的Samsung Epic(Galaxy S系列机型)上也没有任何“最大变焦”或“拍照-最大变焦”参数。
There is a "digi-zoom" but I dont find any info on it's usage. 有一个“ digi-zoom”,但我找不到有关其用法的任何信息。
(I'm the developer.) I agree with both answers above. (我是开发人员。)我同意以上两个答案。 Before Android 2.2 there is no "real" zoom API and some devices don't have an unofficial API that I can guess.
在Android 2.2之前,没有“真正的”缩放API,并且某些设备没有我能猜到的非官方API。 You can try a Froyo build I'm working on that does use the real zoom API to see if it works.
您可以尝试使用我正在开发的Froyo构建,该构建确实使用真正的zoom API来查看其是否有效。 If it does I can share the code privately.
如果可以,我可以私下共享代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.