Scale and fill

更新时间:
复制 MD 格式

This operation first scales an image to a specified size based on its shorter edge. Then, it fills the remaining empty area with a specified color.

Parameters

Name

Description

Valid values

w

The width of the target thumbnail.

1 to 4096

h

The height of the target thumbnail.

1 to 4096

e

The scaling priority edge. This parameter must be set to 4.

4

bgc

The background color for filling. The default color is white. Format: <red>-<green>-<blue>bgc. For example: 100-100-100bgc. Specify a color by setting the red, green, and blue values.

Red, green, blue: 0 to 255

Notes

  • If you do not specify a format, the source image is converted to the JPG format by default. This conversion may cause distortion if the source image is in the PNG, WebP, or BMP format. For more information, see Quality transformations and Format conversions.

  • The bgc parameter specifies the color using RGB values.

Examples