GdPicture.NET Reference Guide
SetROI Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : SetROI Method
Left pixel position of the region of interest.
Top pixel position of the region of interest.
Width, in pixel, of the region of interest.
Height, in pixel, pixel position of the region of interest.
Defines the current region of interest.
Syntax
'Declaration
 
Public Sub SetROI( _
   ByVal Left As Integer, _
   ByVal Top As Integer, _
   ByVal Width As Integer, _
   ByVal Height As Integer _
) 
public void SetROI( 
   int Left,
   int Top,
   int Width,
   int Height
)
public procedure SetROI( 
    Left: Integer;
    Top: Integer;
    Width: Integer;
    Height: Integer
); 
public function SetROI( 
   Left : int,
   Top : int,
   Width : int,
   Height : int
);
public: void SetROI( 
   int Left,
   int Top,
   int Width,
   int Height
) 
public:
void SetROI( 
   int Left,
   int Top,
   int Width,
   int Height
) 

Parameters

Left
Left pixel position of the region of interest.
Top
Top pixel position of the region of interest.
Width
Width, in pixel, of the region of interest.
Height
Height, in pixel, pixel position of the region of interest.
Remarks
The upper-left corner of the image have (0, 0) coordinate.
Example
Setting ROI to specify area of image processing to add noise.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer
ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("input.jpg")
If imageId <> 0 Then
   oGdPictureImaging.SetROI(0, 0, 200, 200)
   oGdPictureImaging.FxAddNoise(ImageID)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
ResetROI Method