Skip to content

change_formatChangeFormatChangeFormatchange_formatchange_formatπŸ”—

Short descriptionπŸ”—

change_formatChangeFormatChangeFormatchange_formatchange_format β€” Change image size.

SignatureπŸ”—

change_format( image Image, out image ImagePart, extent.x Width, extent.y Height )void ChangeFormat( const HObject& Image, HObject* ImagePart, const HTuple& Width, const HTuple& Height )static void HOperatorSet.ChangeFormat( HObject image, out HObject imagePart, HTuple width, HTuple height )def change_format( image: HObject, width: int, height: int ) -> HObject

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 )

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

HImage HImage.ChangeFormat( int width, int height )

DescriptionπŸ”—

The operator change_formatChangeFormat increases or decreases the size of the input images to the indicated height or width, respectively. If the image is reduced, parts are cut off at the β€œright” or β€œlower” edge of the image, respectively. If the image is enlarged, the additional areas are set to 0. The definition domain of the new image is equal to the domain of the input image, clipped to the size of the new image. No zooming is carried out.

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

ParametersπŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Input image.

ImagePartimagePartimage_part (output_object) (multichannel-)image(-array) β†’ object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real / complex / vector_field)

Image with new format.

Widthwidthwidth (input_control) extent.x β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of new image.

Default: 512512
Suggested values: 32, 64, 128, 256, 512, 768, 102432, 64, 128, 256, 512, 768, 1024

Heightheightheight (input_control) extent.y β†’ (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of new image.

Default: 512512
Suggested values: 32, 64, 128, 256, 512, 525, 102432, 64, 128, 256, 512, 525, 1024

Combinations with other operatorsπŸ”—

Combinations

Possible successors

disp_imageDispImage

Alternatives

crop_partCropPart

See also

zoom_image_sizeZoomImageSize, zoom_image_factorZoomImageFactor

ModuleπŸ”—

Foundation