ImageEn, unit imageenproc

TImageEnProc.AutoCrop2

TImageEnProc.AutoCrop2


Declaration

function AutoCrop2(BorderRate: Double = 6; DoCrop: Boolean = True): TRect;


Description

Remove the black border from a white text document using a density analysis algorithm.

Parameter Description
BorderRate The difference between border and text. Must be more than 0
DoCrop If False the image is not cropped, but the suggested area for cropping is returned as the result

Returns the area to crop or cropped.


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

// Remove the black border from a scanned document
ImageEnView1.IO.Acquire();
ImageEnView1.Proc.AutoCrop2();
       

See Also

AutoCrop
CropTransparentBorder
Crop