优化扫码识别速度

This commit is contained in:
jenly1314
2018-08-23 16:20:05 +08:00
parent 02d3172a6f
commit cdb116200f
7 changed files with 13 additions and 13 deletions

Binary file not shown.

View File

@@ -36,17 +36,17 @@ ZXingLite for Android 是ZXing的精简版优化扫码和生成二维码功
<dependency> <dependency>
<groupId>com.king.zxing</groupId> <groupId>com.king.zxing</groupId>
<artifactId>zxing-lite</artifactId> <artifactId>zxing-lite</artifactId>
<version>1.0.0</version> <version>1.0.1</version>
<type>pom</type> <type>pom</type>
</dependency> </dependency>
``` ```
### Gradle: ### Gradle:
```gradle ```gradle
implementation 'com.king.zxing:zxing-lite:1.0.0' implementation 'com.king.zxing:zxing-lite:1.0.1'
``` ```
### Lvy: ### Lvy:
```lvy ```lvy
<dependency org='com.king.zxing' name='zxing-lite' rev='1.0.0'> <dependency org='com.king.zxing' name='zxing-lite' rev='1.0.1'>
<artifact name='$AID' ext='pom'></artifact> <artifact name='$AID' ext='pom'></artifact>
</dependency> </dependency>
``` ```

Binary file not shown.

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"1.0.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@@ -8,7 +8,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.novoda:bintray-release:0.8.1' classpath 'com.novoda:bintray-release:0.8.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

View File

@@ -267,10 +267,10 @@ public final class CameraManager {
// Called early, before init even finished // Called early, before init even finished
return null; return null;
} }
rect.left = rect.left * cameraResolution.x / screenResolution.x; // rect.left = rect.left * cameraResolution.x / screenResolution.x;
rect.right = rect.right * cameraResolution.x / screenResolution.x; // rect.right = rect.right * cameraResolution.x / screenResolution.x;
rect.top = rect.top * cameraResolution.y / screenResolution.y; // rect.top = rect.top * cameraResolution.y / screenResolution.y;
rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y; // rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
framingRectInPreview = rect; framingRectInPreview = rect;
} }
return framingRectInPreview; return framingRectInPreview;
@@ -329,8 +329,8 @@ public final class CameraManager {
return null; return null;
} }
// Go ahead and assume it's YUV rather than die. // Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, return new PlanarYUVLuminanceSource(data, width, height, 0, 0,
rect.width(), rect.height(), false); width, height, false);
} }
} }

View File

@@ -1,7 +1,7 @@
//App //App
def app_version = [:] def app_version = [:]
app_version.versionCode = 1 app_version.versionCode = 2
app_version.versionName = "1.0.0" app_version.versionName = "1.0.1"
ext.app_version = app_version ext.app_version = app_version
//build version //build version