change_formatchange_formatChangeFormatChangeFormatchange_format更改格式(算子)

名称

change_formatchange_formatChangeFormatChangeFormatchange_format — 更改图像尺寸。

签名

change_format(Image : ImagePart : Width, Height : )

Herror change_format(const Hobject Image, Hobject* ImagePart, const Hlong Width, const Hlong Height)

Herror T_change_format(const Hobject Image, Hobject* ImagePart, const Htuple Width, const Htuple Height)

void ChangeFormat(const HObject& Image, HObject* ImagePart, const HTuple& Width, const HTuple& Height)

HImage HImage::ChangeFormat(Hlong Width, Hlong Height) const

static void HOperatorSet.ChangeFormat(HObject image, out HObject imagePart, HTuple width, HTuple height)

HImage HImage.ChangeFormat(int width, int height)

def change_format(image: HObject, width: int, height: int) -> HObject

描述

算子 change_formatchange_formatChangeFormatChangeFormatChangeFormatchange_format 分别将输入图像的尺寸增大或缩小至指定的高度或宽度。若缩小图像,则分别在图像的“右”侧或“下”侧边缘裁剪部分区域。若放大图像,则新增区域被设置为 0。新图像的定义域等于输入图像的定义域,并裁剪至新图像的尺寸。该操作不执行缩放。

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

输入图像。

ImagePartImagePartImagePartImagePartimagePartimage_part (输出对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

采用新格式的图像。

WidthWidthWidthWidthwidthwidth (输入控制)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

新图像的宽度。

默认值: 512

建议值: 32, 64, 128, 256, 512, 768, 1024

HeightHeightHeightHeightheightheight (输入控制)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

新图像的高度。

默认值: 512

建议值: 32, 64, 128, 256, 512, 525, 1024

可能的后继

disp_imagedisp_imageDispImageDispImageDispImagedisp_image

替代

crop_partcrop_partCropPartCropPartCropPartcrop_part

另见

zoom_image_sizezoom_image_sizeZoomImageSizeZoomImageSizeZoomImageSizezoom_image_size, zoom_image_factorzoom_image_factorZoomImageFactorZoomImageFactorZoomImageFactorzoom_image_factor

模块

基础