This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, March 1, 2006 6:55:05 AM(UTC)
Groups: Registered
Posts: 2
I'm using the 14.5 demo version of .net tools in vs2005 / .net 2 / C#
I noticed in the CSMainDemo example, there is an autocropcommand implemented that I would like to make use of. I've written a simple app that scans an image, on the acquirepage trigger I am attempting to first pass the image through the autocropcommand and then save it out. When the autocropcommand runs, I get an exception as follows. I am almost certain that I am not referencing something properly, but for the life of me I can't figure out what it needs to be or what needs to be set in code for this to work. Can anyone point me in the right direction?
Thanks in advance!
Offending code:
using
System;
using
System.IO;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Text;
using
System.Windows.Forms;
using
System.Runtime.InteropServices;
using Leadtools;
using
Leadtools.Twain;
using
Leadtools.Demos;
using
Leadtools.Codecs;
using
Leadtools.ImageProcessing;
using
Leadtools.ImageProcessing.Effects;
using
Leadtools.ImageProcessing.Color;
using
Leadtools.WinForms.CommonDialogs.File;
using
Leadtools.WinForms;
using
Leadtools.Helpers;
using
Leadtools.Kernel;
...
private AutoCropCommand command;
...
try{
command = new AutoCropCommand(20);
command.Run(image);
}
catch (Exception ex){
MessageBox.Show(ex.ToString());
}
System.MissingMethodException: Method Not Found: 'Int32 Leadtools.Kernel.WindowsMethods.RECTWIDTH(Leadtools.Kernel.WinRect.ByRef)'
at L_AutoTrimBitmap(BitmapHandle pBitmap, UInt32 uThreshold)
at Leadtools.ImageProcessing.Effects.AutoCropCommand.Run(IRasterImage image, Object bitmap, RasterImageChangedFlags& changedFlags)
at Leadtools.ImageProcessing.RasterCommand.Run(IRasterImage image)
#2
Posted
:
Friday, March 3, 2006 11:39:55 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Try the attached application. If this fails as well, there may be a problem with the actual image that you are trying to crop. There could also be an issue with the dll's you are using.
File Attachment(s):
CS.zip (28kb) downloaded 42 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.