You can use gradual display parameters to configure gradual display for source images stored in OSS. This topic describes the parameters and examples to configure gradual display.
- Standard display: loads and displays images row by row from top to bottom.
- Gradual display: displays the fuzzy outline of the image, and then loads the image gradually until the complete image is displayed.
format,jpg
parameter to convert the format of the image to JPG.
Parameters
Operation name: interlace
The following table lists the parameters.
Parameter | Description | Valid value |
---|---|---|
[value] | Specifies whether to set the image to gradual display. | 0 and 1
|
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. The public endpoint of the image is https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com
. The images used are example.jpg and panda.png in the root folder.
- Resize the image to a width of 200 pixels and set the image to gradual display
Requirements and parameters:
- Resize the image to a width of 200 pixels:
resize,w_200
- Set the image to gradual display:
interlace,1
The URL used to process the image is in the following format: https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=image/resize,w_200/interlace,1
- Resize the image to a width of 200 pixels:
- Save the PNG image as a JPG image and set the image to gradual display
Requirements and parameters:
- Convert the format of the image to JPG:
format,jpg
- Set the image to gradual display:
interlace,1
The URL used to process the image is in the following format: https://oss-console-img-demo-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/panda.png?x-oss-process=image/format,jpg/interlace,1
- Convert the format of the image to JPG: