GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / CropBorders Method / CropBorders(Int32,Single,ReferencePoint,Int32,Int32,Int32,Int32,ImagingContext) Method
GdPicture image identifier.
Confidence threshold in percentage. Default value is 99 for documents and 92 for digital photo.
A member of the ReferencePoint enumeration. Default value is ReferencePoint.ReferencePointTopLeft.
Returns the left coordinate, in pixel, of the area without margins.
Returns the top coordinate, in pixel, of the area without margins.
Returns the width, in pixel, of the area without margins.
Returns the height, in pixel, of the area without margins.





In This Topic
CropBorders(Int32,Single,ReferencePoint,Int32,Int32,Int32,Int32,ImagingContext) Method
In This Topic
Detects margins consisting of constant color around a GdPicture image. Returns the coordinate of the cropping selection which can be used by the Crop method. It has a Confidence Parameter where if the lines and borders detection confidence exceeds this value they will be removed, and left as they are if the confidence in detecting them is less than the Confidence Parameter Value.
Syntax
'Declaration
 
Public Overloads Function CropBorders( _
   ByVal ImageID As Integer, _
   ByVal Confidence As Single, _
   ByVal PixelReference As ReferencePoint, _
   ByRef Left As Integer, _
   ByRef Top As Integer, _
   ByRef Width As Integer, _
   ByRef Height As Integer, _
   ByVal Context As ImagingContext _
) As GdPictureStatus
public GdPictureStatus CropBorders( 
   int ImageID,
   float Confidence,
   ReferencePoint PixelReference,
   ref int Left,
   ref int Top,
   ref int Width,
   ref int Height,
   ImagingContext Context
)
public function CropBorders( 
    ImageID: Integer;
    Confidence: Single;
    PixelReference: ReferencePoint;
   var  Left: Integer;
   var  Top: Integer;
   var  Width: Integer;
   var  Height: Integer;
    Context: ImagingContext
): GdPictureStatus; 
public function CropBorders( 
   ImageID : int,
   Confidence : float,
   PixelReference : ReferencePoint,
   Left : int,
   Top : int,
   Width : int,
   Height : int,
   Context : ImagingContext
) : GdPictureStatus;
public: GdPictureStatus CropBorders( 
   int ImageID,
   float Confidence,
   ReferencePoint PixelReference,
   ref int Left,
   ref int Top,
   ref int Width,
   ref int Height,
   ImagingContext Context
) 
public:
GdPictureStatus CropBorders( 
   int ImageID,
   float Confidence,
   ReferencePoint PixelReference,
   int% Left,
   int% Top,
   int% Width,
   int% Height,
   ImagingContext Context
) 

Parameters

ImageID
GdPicture image identifier.
Confidence
Confidence threshold in percentage. Default value is 99 for documents and 92 for digital photo.
PixelReference
A member of the ReferencePoint enumeration. Default value is ReferencePoint.ReferencePointTopLeft.
Left
Returns the left coordinate, in pixel, of the area without margins.
Top
Returns the top coordinate, in pixel, of the area without margins.
Width
Returns the width, in pixel, of the area without margins.
Height
Returns the height, in pixel, of the area without margins.
Context

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method requires the Image Documents component to run.

See Also