Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Saturday, October 27, 2007 2:49:13 AM(UTC)

Groups: Registered
Posts: 4

Currently I'm tryin-out LEAD 14.5 evaluation to integrate in my Delphi 7 Isapi Dll.
My application processes scans of pasports and id-cards and I want to add deskew and autotrim functionality.
For the autotrim I want to filter-out dust and spickles, than I want to get de autotrim rect, and then Trim the original image with the rect coordinates.

I need the following functions:
- DeskewExt
- Median
- L_GetAutoTrimRect
- Trim
- Rotate

Because I don't need any visual components I started-out using the COM interface:
  Raster := CreateComObject(CLASS_LEADRaster) as LEADRaster;
  RasterIO := CreateComObject(CLASS_LEADRasterIO) as LEADRasterIO;
  RasterProc := CreateComObject(CLASS_LEADRasterProcess) as LEADRasterProcess;

But the RasterProc doesn't have the L_GetAutoTrimRect function. The COM interface offers me all I need except for the L_GetAutoTrimRec.

So I tried the VCL components:
  LEADImage : TLEADImage;
  LEADProc : TLEADRasterProcess;
  L_GetAutoTrimRec function

TLEadImage has a Deskew but not a DeskewExt function.
TLEADProc has a DeskewExt function but it wants an IDispatch in stead of a TBitmapHandle, so I don't know how to put in the LEADImage.
So I tried to put-in the Raster:
L_GetAutoTrimRect(pointer(Raster.Bitmap), 130,pointer(@Rect)))) returns error -789.

The only thing that works is L_GetAutoTrimRect(pointer(LEADImage.Bitmap), 130,pointer(@Rect)).
But than I need to copy the Raster.Bitmap to the LEADImage.Bitmap. I tried to do this with the L_GetControlBitmap function from LTR14E.dll but
that returns error -13.

So either I need to know:
- how to put the LEADImage in the TLEADProc.DeskewExt function, or
- how to put the Raster.Bitmap in the L_GetAutoTrimRec function.

Can you tell me how this works and Which interface is best for me to use?

Alexander van Meerten
Icontact B.V.



Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, October 29, 2007 1:49:00 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)


You already asked about using the DLL API function and I answered in this post:

However, since you don't need visual display, you can actually build your entire application using the DLL API function calls instead of the COM or the VCL components.
Both COM and VCL are mostly wrappers for the DLLs, so you will get access to all toolkit functionality that way.

Another advantage is that you won't have to settle with v14.5, because the latest version 15 contains DLL APIs, but not VCL and COM. Also, you can use the DLL API functions with Delphi, and v15 is shipped with Delphi demos that are installed under:

Maen Badwan
LEADTOOLS Technical Support
#3 Posted : Monday, November 5, 2007 5:26:14 AM(UTC)

Groups: Registered
Posts: 4

Hello Maen,


Thanks for the help! It works perfectly with the DLL API functions. I'm using v15 now.

I added a Delphi class wrapper to make things easier. Maybe somebody can benefit from it.

Alexander van Meerten

Icontact B.V.

File Attachment(s):
LeadBitmap.txt (6kb) downloaded 37 time(s).
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.072 seconds.