Adjusting Brightness

Last Updated At: 2026-08-14 08:08:00

Feature Overview

Cloud Infinite (CI) adjusts the image brightness through the imageMogr2 API.

This feature supports the following processing methods.

  • Processing upon download

Restrictions

  • Supported formats: JPG, BMP, GIF, PNG, and WebP images can be processed, and HEIF images can be decoded and processed.
  • Size limit: The size of the input image cannot be larger than 32 MB, its width and height cannot exceed 30,000 pixels, and the total number of pixels cannot exceed 250 million. The width and height of the output image cannot exceed 9,999 pixels. For an animated image, the product of width x height x FPS cannot exceed 250 million.
  • FPS (for animated images): For GIFs, the FPS cannot exceed 300.

API Example

Processing upon Download

GET /<ObjectKey>?imageMogr2/bright/<value> HTTP/1.1
Host: <BucketName>.<Endpoint>
Date: <GMT Date>
Authorization: <Auth String>

Note:

Authorization: Auth String (For details, please refer to section Request Signature).

Processing Parameter Description

Operation name: bright

Parameter Description
ObjectKey File name of the object, for example, folder/sample.jpg.
/bright/<value> Image brightness adjustment feature, where the value is the brightness parameter value. Value range: integers in [–100, 100].
- Value < 0: Decreases the image brightness.
- Value = 0: Does not adjust the image brightness.
- Value > 0: Increases the image brightness.
/ignore-error/1 If this parameter is carried and the image fails to be processed because the image is too large or a parameter value exceeds the limit, the input image is returned and no error is reported.

Practical Case

Note:

This type of processing does not save the output image to the bucket.

Example 1: Adjusting Brightness

This example increases the brightness of an image by 70:

http://examples-1251000004.cos.city.yfm4.fsphere.cn/sample.jpeg?imageMogr2/bright/70

The following figure shows the final effect.

Notes

To prevent unauthorized users from accessing or downloading the input image by using a URL that does not carry any processing parameter, you can add the processing parameters to the request signature. The following is a simple example. For a detailed calculation method, see Request Signature.

http://examples-1251000004.cos.city.yfm4.fsphere.cn/sample.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20130524%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20130524T000000Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=<signature-value>&watermark/1/image/aHR0cDovL2V4YW1wbGVzLTEyNTEwMDAwMDQucGljc2gubXlxY2xvdWQuY29tL3NodWl5aW4uanBn/gravity/southeast