Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added InteropDotNet support #107

Merged
merged 1 commit into from
Aug 2, 2014
Merged

Conversation

AndreyAkinshin
Copy link
Contributor

  1. The InteropDotNet library was added (as source code) instead of obsolete WindowsLibraryLoader. Now the Tesseract is cross-platform AnyCPU library. Fixed Working on Mono #23 .
  2. The binaries liblept168.so and libtesseract302.so were taken from Ubuntu 14.04 repo (original files liblept.so.4.0.1 and libtesseract.so.3.0.3)
  3. A bug with Leptonica signatures was fixed. Old signatures:

[DllImport(Constants.LeptonicaDllName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern int pixcmapSerializeToMemory(HandleRef cmap, out int components, out int colorCount, out IntPtr colorData, out int colorDataLength);
[DllImport(Constants.LeptonicaDllName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern IntPtr pixcmapSerializeToMemory(HandleRef colorData, int colorCount, int colorDataLength);

New signatures:

[DllImport(Constants.LeptonicaDllName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern int pixcmapSerializeToMemory(HandleRef cmap, out int components, out int colorCount, out IntPtr colorData, out int colorDataLength);
[DllImport(Constants.LeptonicaDllName, CallingConvention = CallingConvention.Cdecl, EntryPoint = "pixcmapDeserializeFromMemory")]
public static extern IntPtr pixcmapDeserializeFromMemory(HandleRef colorData, int colorCount, int colorDataLength);

@charlesw
Copy link
Owner

I've merged your changes into a new branch feature/mono-support and will do some testing this weekend hopefully should be able to generate a new release come Monday assuming everything works out.

One thing I wouldn't mind doing is updating the .net version to use 3.03 dlls so it's more or less on par with the mono version. I'll have a look and let you know how it goes.

@charlesw
Copy link
Owner

Quick update, I've had a more detailed look and it all looks good. I'll
merge the branch into the main dev branch when I next get the opportunity.

On Sat, Jul 19, 2014 at 7:18 AM, Andrey Akinshin notifications@github.com
wrote:

  1. The InteropDotNet https://github.com/AndreyAkinshin/InteropDotNet
    library was added (as source code) instead of obsolete
    WindowsLibraryLoader. Now the Tesseract is cross-platform AnyCPU
    library. Fixed Working on Mono #23 Working on Mono #23 .
  2. The binaries liblept168.so and libtesseract302.so were taken from
    Ubuntu 14.04 repo (original files liblept.so.4.0.1 and
    libtesseract.so.3.0.3)
  3. A bug with Leptonica signatures was fixed. Old signatures:

[DllImport(Constants.LeptonicaDllName, CallingConvention =
CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern int pixcmapSerializeToMemory(HandleRef cmap, out int
components, out int colorCount, out IntPtr colorData, out int
colorDataLength);
[DllImport(Constants.LeptonicaDllName, CallingConvention =
CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern IntPtr pixcmapSerializeToMemory(HandleRef
colorData, int colorCount, int colorDataLength);

New signatures:

[DllImport(Constants.LeptonicaDllName, CallingConvention =
CallingConvention.Cdecl, EntryPoint = "pixcmapSerializeToMemory")]
public static extern int pixcmapSerializeToMemory(HandleRef cmap, out int
components, out int colorCount, out IntPtr colorData, out int
colorDataLength);
[DllImport(Constants.LeptonicaDllName, CallingConvention =
CallingConvention.Cdecl, EntryPoint = "pixcmapDeserializeFromMemory")]
public static extern IntPtr pixcmapDeserializeFromMemory(HandleRef

colorData, int colorCount, int colorDataLength);

You can merge this Pull Request by running

git pull https://github.com/AndreyAkinshin/tesseract develop

Or view, comment on, or merge it at:

#107
Commit Summary

  • Added InteropDotNet support

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#107.

@charlesw charlesw merged commit 44e11dd into charlesw:develop Aug 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants