CaptureImage.pad Method

Module: CaptureImage

Definition

Add padding around the image

Only works for BGR 24 bits, RGB 24 bits and Grayscale 8bits images.

For grayscale image, the padding color is the red component.

pad(self, top: int, left: int, bottom: int, right: int, color_red: int, color_green: int, color_blue: int) -> None

Parameters

top int
in Padding on top.

left int
in Padding on left.

bottom int
in Padding on bottom.

right int
in Padding on right.

color_red int
in Padding color red (from 0 to 255)

color_green int
in Padding color green (from 0 to 255)

color_blue int
in Padding color blue (from 0 to 255)

Exceptions

An error has occurred during Devices Library execution.
void pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue)

Parameters

top int
in Padding on top.

left int
in Padding on left.

bottom int
in Padding on bottom.

right int
in Padding on right.

colorRed int
in Padding color red (from 0 to 255)

colorGreen int
in Padding color green (from 0 to 255)

colorBlue int
in Padding color blue (from 0 to 255)

Exceptions

An error has occurred during Devices Library execution.
public void Pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue)

Parameters

top int
in Padding on top.

left int
in Padding on left.

bottom int
in Padding on bottom.

right int
in Padding on right.

colorRed int
in Padding color red (from 0 to 255)

colorGreen int
in Padding color green (from 0 to 255)

colorBlue int
in Padding color blue (from 0 to 255)

Exceptions

An error has occurred during Devices Library execution.
public void pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue) throws DevicesException

Parameters

top int
in Padding on top.

left int
in Padding on left.

bottom int
in Padding on bottom.

right int
in Padding on right.

colorRed int
in Padding color red (from 0 to 255)

colorGreen int
in Padding color green (from 0 to 255)

colorBlue int
in Padding color blue (from 0 to 255)

Exceptions

An error has occurred during Devices Library execution.
int id3DevicesCaptureImage_Pad (
    ID3_DEVICES_CAPTURE_IMAGE hCaptureImage,
    int top,
    int left,
    int bottom,
    int right,
    int colorRed,
    int colorGreen,
    int colorBlue)

Parameters

in Handle to the CaptureImage object.

top int
in Padding on top.

left int
in Padding on left.

bottom int
in Padding on bottom.

right int
in Padding on right.

colorRed int
in Padding color red (from 0 to 255)

colorGreen int
in Padding color green (from 0 to 255)

colorBlue int
in Padding color blue (from 0 to 255)

Returns

int
An error code.
See id3DevicesError file for the list of possible error codes.