Image Scaling
Last Updated:2021-03-24
Overview
This article describes how to scale up and down the photo.
Image Scaling Parameter
Name of action: resize
Parameter | Value | Description |
---|---|---|
m | lfit, mfit, fill, pad, fixed |
|
w | 1-4096 |
|
h | 1-4096 |
|
limit | 0,1 |
|
color | 8-digit hex color code |
|
Example
- Scale the photo proportionally, the maximum width of the scaled image is 200, and the maximum height is 100.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/resize,m_lfit,w_200,h_100
- Scale the photo proportionally, the scaled image has a maximum width of 200 and a maximum height of 100, and fill the part of the 200*100 rectangle that is not full of the image with a red background .
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/resize,m_pad,w_200,h_100,color_FF0000
- Scale the photo proportionally, the minimum width of the scaled image is 200, and the minimum height is 100.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/resize,m_mfit,w_200,h_100
- Scale the image evenly with the minimum width of the zoomed image of 200, and the minimum height of 100, and cut the part of image that beyond the size of 200 * 100.
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/resize,m_fill,w_200,h_100
- Force scaling width 200, height 100 .
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?x-bce-process=image/resize,m_fixed,w_200,h_100