Contrast refers to the measurement of different brightness levels between the brightest white and the darkest black of an image, that is, the grayscale contrast of an image. You can use contrast parameter to adjust the contrast of the source images stored in OSS. This topic describes the parameters and examples to adjust the contrast for an image.

Parameters

Operation name: contrast

Parameter Description Valid value
[value] The contrast of the image. [-100,100]
  • A value smaller than 0: reduces the contrast.
  • A value of 0: maintains the contrast.
  • A value greater than 0: increases the contrast.

Examples

You can process images by using object URLs, OSS SDKs, or API operations. In this example, object URLs are used. For more information about how to use OSS SDKs and API operations to process images, see IMG implementation modes.

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