If the purpose of your program isn't opening an image and processing it to turn into some kind of text, you are reading the wrong document ;-). GOCR currently works this way: you open an image, let the modules process it, and close it. This can be done any number of times you want. Image loading and closing is done using:
well, they are pretty clear. gocr_imageLoad() returns 0 in case of success, -1 otherwise. If you try to open an image while there's one already open, gocr_imageLoad() will return -1.
Image loading is part of a module, and gocr_imageLoad() may be overriden. Libgocr provides a default one, which is capable of opening the most common image types. It accepts, as the second argument, one of these: