Ok the title of this post is incorrect - it is any .gif I try (in my
setup). But other file types have no problem (.jpg, .tiff, .png).
I tested with tesseract.exe built from scratch in VS2010, and it worked
without any problems... :(
tesseract 3.02
leptonica-1.68 (Mar 14 2011, 10:43:03) [MSC v.1500 LIB Release 32 bit]
libgif 4.1.6 : libjpeg 8c : libpng 1.4.3 : libtiff 3.9.4 : zlib 1.2.5
So obviously it must be something in my setup, but I can't figure out
what. If it was a marshaling problem, it would effect any file I test.
But it is only .gifs that exhibit this crash. Something in the code path
of reading a gif is not jiving with my setup. I have a suite of functions
which all work without an issue. It's only when reading a .gif comes into
play.
I wrote a very simple function in my wrapper .dll to exhibit the problem:
> __declspec(dllexport) int __cdecl TestRead(const char* inputfile);
> int __cdecl TestRead(const char* inputfile)
> {
> PIX* pixs = NULL;
> pixs = pixRead(inputfile);
> if (pixs == NULL) return TOCR_ERR_UNSUPPORTED_IMAGE;
> pixDestroy(&pixs);
> return TOCR_SUCCESS;
> }
>
On the .NET side, I call it like so:
> [DllImport("TOCR.dll", EntryPoint="?TestRead@@YAHPBD@Z",
> ExactSpelling=true, CallingConvention=CallingConvention.Cdecl)]
> private static extern int _TestRead(string inputfile);
>
> public static ErrorCode TestRead(string inputfile)
> {
> return (ErrorCode)_TestRead(inputfile);
> }
>
> //TOCR.TestRead(@"samples\English.tiff"); // no problems
> //TOCR.TestRead(@"samples\logo3.gif"); // CRASH
> //TOCR.TestRead(@"samples\OCRSam1.jpg"); // no problems
> //TOCR.TestRead(@"samples\46846.gif"); // CRASH
>
Do you think rebuilding the giflib from scratch with VS2010 would make any
difference?
On Tuesday, December 18, 2012 7:55:57 PM UTC-5, TP wrote:
>
> On Tue, Dec 18, 2012 at 6:58 AM, occorled <[email protected] <javascript:>>
> wrote:
> > What version of leptonica is your tesseract using?
>
> tesseract.exe -v
> tesseract 3.02
> leptonica-1.68 (Feb 21 2012, 05:25:30) [MSC v.1500 DLL Release 32 bit]
> libgif 4.1.6 : libjpeg 8c : libpng 1.4.3 : libtiff 3.9.4 : zlib 1.2.5
>
> BTW, built using VS2008 *not* VS2010.
>
--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en