Use Picture Styles

最近更新时间:2020-04-03 03:43:34

Use picture styles

KS3 supports to process pictures through native styles, specifically, connecting the style strings via @base@; at the same time, it supports to access via style names: the original image URL@style@style name.

Example

Original image

There is a test sample picture in our test Bucket, which can be accessed through the link below. https://kss.ksyun.com/ks3/image_deal/suiyi.jpg

image.png

Watermark

You can add a watermark to the picture. On the basis of the above picture, we add a watermark of "Kingsoft Cloud" texts. The result can be obtained in two methods:

Method 1:
    https://kss.ksyun.com/ks3/image_deal/suiyi.jpg@base@tag=imgScale&q=100&format=PNG|tag=imgWaterMark&type=2&dissolve=65&gravity=NorthWest&text=6YeR5bGx5LqR&font=6buR5L2T&fill=I2ZmMA==&fontsize=500&dy=10&dx=10

Method 2:
    https://kss.ksyun.com/ks3/image_deal/suiyi.jpg@style@shuiyin

image.png

Thumbnail

For a thumbnail with a length of 100 and a width of 100, with center cropping, two methods can be used to obtain the result:

Method 1:   https://kss.ksyun.com/ks3/image_deal/suiyi.jpg@style@scale

Method 2:   https://kss.ksyun.com/ks3/image_deal/suiyi.jpg@base@tag=imgScale&m=1&c=1&q=85&w=100&h=100

image.png

金山云,开启您的云计算之旅

注册有礼