Search code examples
cgoleptonica

Trying to use C wrapper in Go?


I must be missing something but I'm trying to use the Leptonica C library in Go using a C wrapper that was made for that purpose:

https://github.com/GeertJohan/go.leptonica/blob/master/leptonica.go

But I don't understand... it allows me to import files but then how do I actually invoke the Leptonica functions? (Specifically I want to detect the deskew of the image using Leptonica.)

I don't see any function in the Go wrapper that allows me to send a command like this. How do I talk to it?


Solution

  • go.leptonica simply hasn't implemented that. You'll have to call the C functions yourself.

    Use leptonica.go as a starting point, and write your own wrapper.