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 ImageImageImageImageimageimage and returns the resulting image in ImageBorderImageBorderImageBorderImageBorderimageBorderimage_border.

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

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

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

Execution Information

Parameters

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

Input image.

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

Output image.

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

Size of the border in pixels.

Default: 10

ValueValueValueValuevaluevalue (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_offsetTileImagesOffsetTileImagesOffsetTileImagesOffsettile_images_offset

Module

Foundation