LBXScan icon indicating copy to clipboard operation
LBXScan copied to clipboard

如何手動調整聚焦讓畫面更清楚

Open tommyz opened this issue 7 years ago • 3 comments

想請問開源者該如何在掃描QRcode的時候又能使用對焦的功能呢?

tommyz avatar Apr 12 '18 02:04 tommyz

同问

liubang0909 avatar Feb 21 '19 07:02 liubang0909

    CGAffineTransform transform = _videoPreView.transform;
    _videoPreView.transform = CGAffineTransformScale(transform, zoom, zoom);

这是一个bug,项目中使用这种方式放大对焦也是醉了。。。

TheLittleBoy avatar Mar 21 '19 05:03 TheLittleBoy

替换成这种方式就可以了:

    if (scale < _input.device.activeFormat.videoMaxZoomFactor) {
        [_input.device rampToVideoZoomFactor:scale withRate:10];
    }

TheLittleBoy avatar Mar 21 '19 05:03 TheLittleBoy