Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android just takes BLACK & WHITE picture #32

Open
AllanLotta opened this issue Jan 9, 2020 · 5 comments
Open

Android just takes BLACK & WHITE picture #32

AllanLotta opened this issue Jan 9, 2020 · 5 comments

Comments

@AllanLotta
Copy link

In Iphone i can get a color picture but in Android the lib just return a black & white.

Can someone help me?

"react-native": "0.59.9",
"@woonivers/react-native-document-scanner": "1.6.2"

image

@wwasuu
Copy link

wwasuu commented Jan 10, 2020

/android/src/main/java/com/documentscanner/ImageProcessor.java

carbon

@AllanLotta
Copy link
Author

Thanks @wwasuu , It's works!

@erie-e9
Copy link

erie-e9 commented May 14, 2020

Same problem but I didn´t understand how to solve it. Help

@AllanLotta
Copy link
Author

@eric-andrade You need change the code of the lib for solve it. Go to node_modules/@woonivers/react-native-document-scanner/android/src/main/java/com/documentscanner/ImageProcessor.java
and comment the line Imgproc.cvtColor(src, src, Imgproc.COLOR_RGBA2GRAY);

like this:
image

@andreasjpunkt
Copy link

@Woonivers ... Please remove this or at least add a parameter for switching it off and on. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants