NeutrinosPlatform / cordova-plugin-document-scanner

cordova plugin for document scan
https://www.neutrinos.co/
MIT License
85 stars 60 forks source link

Am getting a blank screen after scanning #46

Closed reviloera closed 5 years ago

reviloera commented 5 years ago

After getting edges of the document ... when I save the end of the scanning process the screen is just black with options at the top for adding filters .... What could be wrong?

Am using Huawei LT adroid 6.0

Thank you

ChrisTomAlx commented 5 years ago

Hey @reviloera

Thanks for bringing forward this issue. That is indeed strange behavior. Please answer these questions as best as you can so I can analyse your situation.

  1. Can you continue after applying a filter?
  2. What happens if you continue ? [Console log the response and see what happens?]
  3. Can you try debugging using android studio ?
  4. Could you sent me a screenshot of what is happening along with the actual image you are trying to click ? take both these images on the same device and sent me.
  5. Is there any other info you can provide about your device, like does it only use 64 bit architectures?

Cheers, Chris Neutrinos

reviloera commented 5 years ago

@ChrisTomAlx

at times its working at times its failing .... so I dont know why. Am also testing on Galaxy Tab(2016) android version 5.1.1 and its crashing.

let me send you my results for Huawei when it fails.

reviloera commented 5 years ago

This is the black screen am running into after some scans .... I dont know why?

screenshot_2019-02-21-12-14-24 1

ChrisTomAlx commented 5 years ago

What happens if you click save?

Cheers, Chris Neutrinos

ChrisTomAlx commented 5 years ago

Closing as there has been no response for a while, Please reopen if you still need help. Or if you solved the issue please leave the solution as a comment so it might help others.

Cheers, Chris Neutrinos

sdegunst commented 5 years ago

I had the same problem. After use of debugging (adb logcat), I catch the following error : " OpenGLRenderer: Bitmap too large to be uploaded into a texture (3403x4899, max=4096x4096)". So when you crop the photo to a small size, it works fine... I think it can be a good track to follow ...

ChrisTomAlx commented 5 years ago

I will look into this and get back to you. There probably has to be an option to set a quality.

Cheers, Chris Neutrinos

reviloera commented 5 years ago

@sdegunst I will try out your suggestion and see how it's behaving. Thanks so much for the insight

grimaldistudio commented 5 years ago

I think this problem is the same as #47

ChrisTomAlx commented 5 years ago

Hey @ all. Finally got around to fixing the quality issue. From plugin version 4.1.0 onwards, you can now pass in quality property inside the options object. As shown here :- {quality : 1.0}.

As mentioned in the readme, 1.0 is the highest quality and 5.0 is the lowest quality. Any values not in this range will default to the highest quality of 1.0

Example :-

    scan.scanDoc(onSuccess, onFail, {sourceType : 1, fileName : "myfilename", quality : 2.5}); 
    // sourceType will by default take value 1 if no value is set | 0 for gallery | 1 for camera. 
    // fileName will take default value "image" if no value set. Supported only on 4.x.x plugin version

    function onSuccess(imageURI) {
        alert(imageURI);
        console.log(imageURI);
        //var image = document.getElementById('myImage');
        //image.src = imageURI; // For iOS, use image.src = imageURI + '?' + Date.now(); to solve issue 10 if unique fileName is not set.

    }

    function onFail(message) {
        alert('Failed because: ' + message);
    }

Closing this issue as upgrading to plugin version 4.1.0 should solve all of the following related issues #35, #46 & #47. If there are any problems in your trials please raise a new issue.

Cheers and thank you for being patient, Chris Neutrinos