Skip to content

Commit

Permalink
优化扫码识别速度
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Aug 23, 2018
1 parent 02d3172 commit cdb1162
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ ZXingLite for Android 是ZXing的精简版,优化扫码和生成二维码功
<dependency>
<groupId>com.king.zxing</groupId>
<artifactId>zxing-lite</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<type>pom</type>
</dependency>
```
### Gradle:
```gradle
implementation 'com.king.zxing:zxing-lite:1.0.0'
implementation 'com.king.zxing:zxing-lite:1.0.1'
```
### 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>
</dependency>
```
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -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":{}}]
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
jcenter()
}
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'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
12 changes: 6 additions & 6 deletions lib/src/main/java/com/king/zxing/camera/CameraManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ public synchronized Rect getFramingRectInPreview() {
// Called early, before init even finished
return null;
}
rect.left = rect.left * cameraResolution.x / screenResolution.x;
rect.right = rect.right * cameraResolution.x / screenResolution.x;
rect.top = rect.top * cameraResolution.y / screenResolution.y;
rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
// rect.left = rect.left * cameraResolution.x / screenResolution.x;
// rect.right = rect.right * cameraResolution.x / screenResolution.x;
// rect.top = rect.top * cameraResolution.y / screenResolution.y;
// rect.bottom = rect.bottom * cameraResolution.y / screenResolution.y;
framingRectInPreview = rect;
}
return framingRectInPreview;
Expand Down Expand Up @@ -329,8 +329,8 @@ public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data, int width, int
return null;
}
// Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top,
rect.width(), rect.height(), false);
return new PlanarYUVLuminanceSource(data, width, height, 0, 0,
width, height, false);
}

}
4 changes: 2 additions & 2 deletions versions.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//App
def app_version = [:]
app_version.versionCode = 1
app_version.versionName = "1.0.0"
app_version.versionCode = 2
app_version.versionName = "1.0.1"
ext.app_version = app_version

//build version
Expand Down

0 comments on commit cdb1162

Please sign in to comment.