CameraKit / camerakit-android

Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.
https://camerakit.io
MIT License
5.36k stars 878 forks source link

after captureImage , preview is stretched #562

Open kotran88 opened 5 years ago

kotran88 commented 5 years ago

version is 0.13.4

on portrait mode it's okay. but when I angled 270 degree to take photo in landscape, it happened. took photo quite well but preview is stretched and text recognized weird as well.

`cameraview.addCameraKitListener(new CameraKitEventListener() { @Override public void onEvent(CameraKitEvent cameraKitEvent) { }

        @Override
        public void onError(CameraKitError cameraKitError) {
        }
        @Override
        public void onImage(CameraKitImage cameraKitImage) {
            Bitmap bitmap=cameraKitImage.getBitmap();
            bitmap=Bitmap.createScaledBitmap(bitmap,cameraview.getWidth(),cameraview.getHeight(),false);
            cameraview.stop();
            recognizeText(bitmap);
        }
        @Override
        public void onVideo(CameraKitVideo cameraKitVideo) {
        }
    });`