Image.pad Method¶
Module: Image
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
intin Padding on top.left
intin Padding on left.bottom
intin Padding on bottom.right
intin Padding on right.color_red
intin Padding color red (from 0 to 255)color_green
intin Padding color green (from 0 to 255)color_blue
intin Padding color blue (from 0 to 255)
Exceptions
An error has occurred during Face Library execution.
void pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue)
Parameters
top
intin Padding on top.left
intin Padding on left.bottom
intin Padding on bottom.right
intin Padding on right.colorRed
intin Padding color red (from 0 to 255)colorGreen
intin Padding color green (from 0 to 255)colorBlue
intin Padding color blue (from 0 to 255)
Exceptions
An error has occurred during Face Library execution.
public void Pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue)
Parameters
top
intin Padding on top.left
intin Padding on left.bottom
intin Padding on bottom.right
intin Padding on right.colorRed
intin Padding color red (from 0 to 255)colorGreen
intin Padding color green (from 0 to 255)colorBlue
intin Padding color blue (from 0 to 255)
Exceptions
An error has occurred during Face Library execution.
public void pad(int top, int left, int bottom, int right, int colorRed, int colorGreen, int colorBlue) throws FaceException
Parameters
top
intin Padding on top.left
intin Padding on left.bottom
intin Padding on bottom.right
intin Padding on right.colorRed
intin Padding color red (from 0 to 255)colorGreen
intin Padding color green (from 0 to 255)colorBlue
intin Padding color blue (from 0 to 255)
Exceptions
An error has occurred during Face Library execution.
public func pad(top: Int32, left: Int32, bottom: Int32, right: Int32, colorRed: Int32, colorGreen: Int32, colorBlue: Int32) throws
Parameters
top
Int32in Padding on top.left
Int32in Padding on left.bottom
Int32in Padding on bottom.right
Int32in Padding on right.colorRed
Int32in Padding color red (from 0 to 255)colorGreen
Int32in Padding color green (from 0 to 255)colorBlue
Int32in Padding color blue (from 0 to 255)
Exceptions
An error has occurred during Face Library execution.
int id3FaceImage_Pad (
ID3_FACE_IMAGE hImage,
int top,
int left,
int bottom,
int right,
int colorRed,
int colorGreen,
int colorBlue)
Parameters
hImage
ID3_FACE_IMAGEin Handle to the Image object.top
intin Padding on top.left
intin Padding on left.bottom
intin Padding on bottom.right
intin Padding on right.colorRed
intin Padding color red (from 0 to 255)colorGreen
intin Padding color green (from 0 to 255)colorBlue
intin Padding color blue (from 0 to 255)
Returns