优化扫码识别速度
This commit is contained in:
@@ -267,10 +267,10 @@ public final class CameraManager {
|
||||
// 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;
|
||||
@@ -329,8 +329,8 @@ public final class CameraManager {
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user