There are no functions that I am aware of that will select the area around the text for cropping. If the signature image background is white and the text is black then the following will work quite well:
ImageEnView1.SelectColors(TColor2TRGB(clBlack));
ImageEnView1.Proc.CropSel();
ImageEnView1.Deselect;
If the text color is blue then replace clBlack with clBlue.
In my tests, this reduced a 256x256 signature image to 115x115.
Also if the location of the signature is in the same location in your images you can just set the selection to the proper dimensions and then crop the selection:
{ Figure out the area to select and add those values to the following}
ImageEnView1.Select(100, 900, 150, 100);
{ Crop the selection }
ImageEnView1.Proc.CropSel();
ImageEnView1.Deselect;
You could also try:
ImageEnView1.Select(100, 900, 150, 100);
ImageEnView1.SaveSelectionToFile('Signature');
Then when you want to crop the image call LoadSelectionFromFile and crop:
ImageEnView1.LoadSelectionFromFile('Signature');
ImageEnView1.Proc.CropSel();
ImageEnView1.Deselect;
Also see:
procedure SaveSelection and RestoreSelection.
Description
Adds the current selection to the stack (selections list).
Example
ImageEnView1.Select(10, 10, 100, 100);
ImageEnView1.SaveSelection;
ImageEnView1.Select(200, 200, 150, 150);
ImageEnView1.SaveSelection;
ImageEnView1.Deselect;
ImageEnView1.RestoreSelection; // reload 200,200,150,150
..
ImageEnView1.RestoreSelection; // reload 10,10,100,100
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development