Page 1 of 1

Missing methods in GdPicture14

Posted: Wed Mar 28, 2018 5:21 pm
by pkazakov
Hello, I'm migrating my app to use GdPicture14 from using GdPicture12.

Some old methods of GdPictureImaging can't be found.
Could you please tell how API changed to migrate my OCR logic intact?
My faulty code is here:

Code: Select all

                using (var gdPictureImaging = new GdPictureImaging())
                {
                    var context = OCRContext.OCRContextDocument

                    gdPictureImaging.OCRTesseractSetOCRContext(context);
                    gdPictureImaging.ResetROI();
                    gdPictureImaging.OCRTesseractReinit();
                    gdPictureImaging.OCRTesseractSetPassCount(1);

                    var content = gdPictureImaging.OCRTesseractDoOCR(_nativeImage, lang, _dictionaryPath, string.Empty);

                    return content;
                }
These methods in no longer present in GdPictureImaging class:
OCRTesseractSetOCRContext(context);
OCRTesseractReinit();
OCRTesseractSetPassCount(1);
OCRTesseractDoOCR(_nativeImage, lang, _dictionaryPath, string.Empty);

Re: Missing methods in GdPicture14

Posted: Thu Mar 29, 2018 6:47 pm
by Loïc
Hello,

You need to use the dedicated GdPictureOCR class providing a more featured interface. The documentation offers complete examples of usage for each method so you should be able to make the migration very quickly. In case you are encountering any problem feel free to open a ticket to the helpdesk.

Cheers,

Loïc