houqp / leptess

Productive and safe Rust binding for leptonica and tesseract
https://houqp.github.io/leptess/leptess/index.html
MIT License
259 stars 29 forks source link

Leptonica 1.83.0 #54

Closed ccouzens closed 1 year ago

ccouzens commented 1 year ago

Make changes to support leptonica 1.83.0

https://github.com/ccouzens/leptonica-plumbing/issues/5

Basically leptonica made the fields within its structs private. Which means we can only get go them via leptonica's methods.

In the case of pixa and boxa, it required bigger changes as we could no longer get to their items directly. When going through leptonica's methods, we no longer merely borrow the memory, but get a reference counted copy. This requires us to handle it differently (eg dropping it afterwards).