add_image_borderadd_image_borderAddImageBorderAddImageBorderadd_image_border (Operator)

Name

add_image_borderadd_image_borderAddImageBorderAddImageBorderadd_image_border — Add a border to an image.

Signature

add_image_border(Image : ImageBorder : Size, Value : )

Herror add_image_border(const Hobject Image, Hobject* ImageBorder, const Hlong Size, const Hlong Value)

Herror T_add_image_border(const Hobject Image, Hobject* ImageBorder, const Htuple Size, const Htuple Value)

void AddImageBorder(const HObject& Image, HObject* ImageBorder, const HTuple& Size, const HTuple& Value)

HImage HImage::AddImageBorder(const HTuple& Size, const HTuple& Value) const

HImage HImage::AddImageBorder(Hlong Size, Hlong Value) const

static void HOperatorSet.AddImageBorder(HObject image, out HObject imageBorder, HTuple size, HTuple value)

HImage HImage.AddImageBorder(HTuple size, HTuple value)

HImage HImage.AddImageBorder(int size, int value)

def add_image_border(image: HObject, size: MaybeSequence[int], value: MaybeSequence[Union[int, str]]) -> HObject

Description

Adds a border to the input image ImageImageImageimageimage and returns the resulting image in ImageBorderImageBorderImageBorderimageBorderimage_border.

The size of the border in pixels must be passed in SizeSizeSizesizesize. It can be set as follows:

The gray value of the added border must be passed in ValueValueValuevaluevalue. It can be set as follows:

Note that add_image_borderadd_image_borderAddImageBorderAddImageBorderadd_image_border will ignore the input domain and will always return an image with a full domain in ImageBorderImageBorderImageBorderimageBorderimage_border.

Execution Information

Parameters

ImageImageImageimageimage (input_object)  multichannel-image-array objectHImageHObjectHObjectHobject (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)

Input image.

ImageBorderImageBorderImageBorderimageBorderimage_border (output_object)  multichannel-image-array objectHImageHObjectHObjectHobject * (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)

Output image.

SizeSizeSizesizesize (input_control)  attribute.name(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Size of the border in pixels.

Default: 10

ValueValueValuevaluevalue (input_control)  attribute.name(-array) HTupleMaybeSequence[Union[int, str]]HTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Gray value of the border.

Default: 100

Example (HDevelop)

* Add a border of 20 pixels with a constant gray value of 255
* on all four sides of Image
read_image (Image, 'printer_chip/printer_chip_01')
add_image_border (Image, ImageBorder, 20, 255)

* Add a 10-pixel border with a constant gray value of 255 to
* the left and right side and a 20-pixel border with the same
* gray value to the top and bottom of Image.
read_image (Image, 'printer_chip/printer_chip_01')
add_image_border (Image, ImageBorder, [10, 20], 255)

Alternatives

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset

Module

Foundation