Creating Image Styles

Context

By creating image styles, you can process the image such as cropping, compressing, and watermarking. If some common procedures are needed for multiple images, you can create image styles to avoid repetitive operations. Once a style is successfully created, it can be used by multiple images in the bucket.

When creating styles, you can view the style effects of the sample image on the right.

When using RESTful APIs to access Image Processing, you can call the style name in the URL to avoid inputting complicated commands.

You can create a maximum of 100 styles for one bucket at one time.

Procedure

  1. Log in to the management console.
  2. On the homepage of the management console, choose All Services > Storage > Object Storage Service.
  3. Click the bucket name, and select Image Processing.
  4. Click Create Style to go to the style editing page, as shown in Figure 1.

    Figure 1 Create Style

  5. On the editing page, you can edit the style name and basic properties. You can also set the resize mode, as well as perform operations like rotation/cropping, watermarking, and image output.

    • Style Name

      Input an easy-to-remember style name, which can consist of uppercase or lowercase English letters, digits, underlines (_), and hyphens (-). The style name contains 1 to 256 characters. For example, rotate_0001.

    • Edit Mode

      You can either choose GUI mode for visible editing, or choose Code mode. For details about Code mode, see Management.

      An example code is as follows:

      image/sharpen,100/blur,r_1,s_1/resize,m_lfit,h_400,w_400,limit_1
    • Parameter settings

      You can set image effects, resizing, watermarks, and parameter values. For details, see Management.

  6. After finishing editing the image style, click OK to save the style. The new style will be displayed in the style list.
Registration