All Products
Search
Document Center

CDN:Change the color of an image

Last Updated:Oct 14, 2024

If chromatic aberration or blurred images due to camera settings or device compatibility occur, you can use the feature provided by Alibaba Cloud CDN to change the brightness, contrast, and sharpness of images to improve image resolution and visual effects.

Note
  • The image editing feature of Alibaba Cloud CDN, the image editing feature of DCDN, and the Image Processing (IMG) feature of Object Storage Service (OSS) are three different features.

  • Image editing is free of charge until further notice.

  • When you use the image editing feature, conversion between different image formats, such as JPEG to WebP, JPEG to PNG, and PNG to WebP, may result in larger image sizes. This is because different image formats use different compression algorithms. If you want to reduce image sizes, we recommend that you configure the quality parameter to reduce the image quality.

Parameters

The following table describes the parameters.

Parameter

Description

Valid value

bright

The percentage by which you want to adjust the image brightness.

[-100, 100]

  • A value smaller than 0 decreases the brightness of the image.

  • A value of 0 does not change the brightness of the image.

  • A value greater than 0 increases the brightness of the image.

contrast

The contrast of the image.

[-100,100]

  • A value smaller than 0 decreases the contrast.

  • A value of 0 does not change the contrast.

  • A value greater than 0 increases the contrast.

sharpen

The sharpness of the image.

[50,399]

A greater value specifies a clearer image. However, an excessively large value may result in image artifacts. We recommend that you use the following values: 50, 100, 150, 200, 250, and 300.

Examples

  • Sharpen an image by setting the sharpen parameter to 100. The request URL is http(s)://example.com/image01.png?image_process=sharpen,100.

  • Increase the brightness of the image by 50. The request URL is: http(s)://example.com/image01.png?image_process=bright,50.

  • Reduce the contrast of the image by 50. The request URL is http(s)://example.com/image01.png?image_process=contrast,50.