You can use the incircle parameter to process an image stored in OSS as an incircle. This topic describes the parameters and examples to save an image in an ellipse.

Parameters

Operation name: circle

The following table lists the parameters.

Parameter Description Valid value
r Specifies the radius of an incircle. [1,4096]

Usage notes

  • If the final format of the image is PNG, WebP, or BMP that supports alpha channels, the areas of the image outside the ellipse become transparent. If the final format of the image is JPG, the areas of the image outside the ellipse become white. We recommend that you save the processed image in PNG.
  • If the value of r is greater than half of the shortest side of the source image, the incircle is returned based on the value of the half of the shortest side of the source image. Value of r = The shortest side of the source image/2.

Examples

The image-demo bucket that is located in the China (Hangzhou) region is used as an example. Public endpoint of the image: