You can provide this info as a Pull Request in GitHub repo for easier review and search.
On Wed, Jun 6, 2018 at 2:24 PM Paul TOTH <papa2enfa...@gmail.com> wrote: > Hello, > > I'm not a C++ developer and I'm new to the project so I don't want to > disturb the repository with my code...but, I've made some changes that > could be interesting. > > my purpose was to use libTesseract (3) from a Delphi application. > > first change, I've added a function to deal with in-memory image. > > TESS_API BOOL TESS_CALL TessBaseAPIProcessPagesData(TessBaseAPI* handle, > const unsigned char* imagedata, int imagesize, ETEXT_DESC* monitor, > TessResultRenderer* renderer); > > the code is almost the same as for stdin but with provided imagedata and > with a monitor to handle progression. > > then I'de like to add my own output handler so I've added this function > > typedef int(*WRITE_FUNC)(void* sender, const char* data, int size); > > TESS_API void TESS_CALL TessResultRendererWriteCallback(TessResultRenderer > * renderer, WRITE_FUNC writefunc, void* sender); > > > with just a fix on TessResultRenderer > > void TessResultRenderer::AppendData(const char* s, int len) { > int n = writefunc_ ? writefunc_(writesender_, s, len) : fwrite(s, 1, len > , fout_); > if (n != len) happy_ = false; > } > > Now I am able to convert any image from a memory stream to a any kind of > stream...this is usefull for database image processing. > > it could be better with a source image streaming but it require more > changes. > > -- > You received this message because you are subscribed to the Google Groups > "tesseract-ocr" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tesseract-ocr+unsubscr...@googlegroups.com. > To post to this group, send email to tesseract-ocr@googlegroups.com. > Visit this group at https://groups.google.com/group/tesseract-ocr. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tesseract-ocr/3d164e72-13e8-442f-836f-702caa9132ce%40googlegroups.com > <https://groups.google.com/d/msgid/tesseract-ocr/3d164e72-13e8-442f-836f-702caa9132ce%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/CAG2NduXusB4bz%2BOfdr4Skj1v9t7vU-2OXP6JEtp_AKzSoaP7yQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.