Last updated：2021-08-20 12:00:22
Image processing is the feature of generating thumbnails and adding watermarks, which is provided by Kingsoft Cloud based on the basic features of data storage. You can create a maximum of 100 image styles for a bucket. For the convenience of developers, Kingsoft Cloud provides predefined image styles, which can greatly shorten the length of the request URL and provide better readability.
Log in to the KS3 console. In the left navigation pane, click Bucket. On the page that appears, click the name of the bucket where you want to create thumbnails. On the page that appears, click the Picture Processing tab and then click Create Style.
(1) Style Name: The name will be used to reference this style in subsequent operations.
(2) Enable Suffix Matching: If the suffix of the name of an image matches the content you specified, the style is applied to this image. For example, if you specify example as the style name and /png as the suffix, all images whose name suffix with png are processed by using the style named example.
(3) Rules of resizing images:
(4) Rotation Mode: You can set this parameter to No Rotation, Rotate automatically according to exif, and Rotate according to the custom angle.
(5) Picture Format: You can use the source image format or select one of the following formats as the final format of the thumbnail: JPG, JPEG, PNG, GIF, WBMP, and BMP.
Note: If you have enabled the source image protection feature, the thumbnail protection feature does not work. To enable the thumbnail protection feature, disable source image protection first.
(6) Picture Quality: You can set this parameter to reduce the size and adjust the quality of the final image. Adjusting the image quality may affect the image effect. Therefore, properly adjust the quality based on your requirements.
(7) Add Watermark: You can specify whether to add a watermark, and whether to add a text watermark or an image watermark.
You can add a text watermark or an image watermark to an image. You can perform the following operations when you add a watermark:
Set the position of the watermark. You can further adjust the watermark position by setting the X-axis Margin(px) and Y-axis Margin(px) parameters. The X-axis Margin(px) parameter indicates the horizontal distance between the right edges of the watermark and the image. The Y-axis Margin(px) parameter indicates the vertical distance between the bottom edges of the watermark and the image. The following figure shows how to set the position.