Files
docconv/image.go
T
Hamish c4a9e3d578 ocr: update gosseract to v2
This also allows multiple gosseract languages to be provided.

Co-authored-by: Jonathan Ingram <jonathan.b.ingram@gmail.com>
2020-07-02 07:46:51 +10:00

18 lines
387 B
Go

// +build !ocr
package docconv
import (
"fmt"
"io"
)
// ConvertImage converts images to text.
// Requires gosseract (ocr build tag).
func ConvertImage(r io.Reader) (string, map[string]string, error) {
return "", nil, fmt.Errorf("docconv not built with `ocr` build tag")
}
// SetImageLanguages sets the languages parameter passed to gosseract.
func SetImageLanguages(...string) {}