Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

fix Java tests for leptronica #265

Merged
merged 6 commits into from
Jul 13, 2019
Merged

fix Java tests for leptronica #265

merged 6 commits into from
Jul 13, 2019

Conversation

alexcohn
Copy link
Contributor

@alexcohn alexcohn commented Jul 4, 2019

As discussed in #87 (comment), this PR fixes the Java tests for Leptronica.

alexc added 6 commits July 4, 2019 01:06
nativeWriteBitmap() changes the source pix data. The fix is in test code, because changing the C++ behavior may break some code that relies on it, or call pixEndianByteSwap() to return to original byte order after write.

rmtheis#228 (comment)

cherry-pick alexcohn/Tesseract4Android@02e0d37
default quality (0 is translated to 75) produces too much noise, use 85 is much better

cherry-pick alexcohn/Tesseract4Android@cb181a0
we can do this now because for Pix of type Jpeg, we ignore the least significant bit

note that we cannot tighten the threshold for testReadMem_jpg because ReadFile.readMem(byte[]) does not use Pix read from Jpeg, but goes through Bitmap in memory via the Android BitmapFactory API.

cherry-picks alexcohn/Tesseract4Android@66255b0
@rmtheis
Copy link
Owner

rmtheis commented Jul 13, 2019

Thank you!

@rmtheis rmtheis merged commit 6223e09 into rmtheis:master Jul 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants