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

Create an example of using with leptonica's c-api #60

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ccouzens
Copy link
Collaborator

It needed support to be able to get the mut pointer from leptonica-plumbing

ccouzens/leptonica-plumbing@4a721e7

And for leptonica-plumbing pix to self reference

ccouzens/leptonica-plumbing@545708c

It uses this so that methods can take AsRefLeptonicaPlumbing::Pix which both leptess and leptonica-plumbing satisfy.

Addresses #59

It needed support to be able to get the mut pointer from leptonica-plumbing

ccouzens/leptonica-plumbing@4a721e7

And for leptonica-plumbing pix to self reference

ccouzens/leptonica-plumbing@545708c

It uses this so that methods can take AsRef<LeptonicaPlumbing::Pix> which
both leptess and leptonica-plumbing satisfy.

Addresses #59
```
5 | use self::tesseract_sys::TessBaseAPIInit5;
  |     ^^^^^^^^^^^^^^^^^^^^^----------------
  |     |                    |
  |     |                    help: a similar name exists in the module: `TessBaseAPIInit1`
  |     no `TessBaseAPIInit5` in the root
```

https://github.com/houqp/leptess/actions/runs/7589902627/job/20675452376

This will be because the environment github uses doesn't have the new version of tesseract.
@@ -18,10 +18,10 @@ jobs:
run: sudo apt-get install libleptonica-dev libtesseract-dev clang tesseract-ocr-eng
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
run: cargo build --verbose --no-default-features
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix build failures that depend on a newer version of tesseract

https://github.com/houqp/leptess/actions/runs/7589902627/job/20675452376

So that we can disable tesseract 5-2 feature
thiserror = "1"
leptonica-plumbing = "~1.3.0"
Copy link
Collaborator Author

@ccouzens ccouzens Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify this directly rather than as a transient dependency, as the example depends on the latest version.

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

Successfully merging this pull request may close these issues.

1 participant