This topic describes the parameters and examples to save an image in an ellipse.

Precautions

  • 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 specified radius is greater than the radius of the largest incircle of the source image, the largest incircle still applies to cropping.

Parameters

Operation name: circle

The following table lists the parameters.

Parameter Description Valid value
r The radius of the ellipse of the image. The radius cannot exceed half of the shortest side of the source image. If the radius exceeds half of the shortest side, the ellipse is still the largest incircle that applies to cropping.

Examples

  • Crop an image with a crop radius of 100 px. If the image is saved in JPG format, the areas of the image outside the ellipse become white.

    The URL used to process the image is in the following format: <Source image URL>? x-oss-process=image/circle,r_100

  • Crop an image with a crop radius of 100 px. If the image is saved in PNG format, the areas of the image outside the ellipse become transparent.

    The URL used to process the image is in the following format: <Source image URL>? x-oss-process=image/circle,r_100/format,png