Code Mode
This section shows an example of how to create a resizing style in code mode on OBS Console.
Procedure
- On the console homepage, click Service List in the upper left corner and choose Storage > Object Storage Service.
- In the bucket list, click the bucket you want to go to the Objects page.
- Click Upload Object. The Upload Object page is displayed.
- Select the image that you want to upload and click Open.
- Click Upload to upload the image. The uploaded image is displayed in the object list.
- In the navigation pane, choose Image Processing.
- Click Create. The style editing page is displayed.
- Input the style name style002. On the editing page, select Code.
- In the code input box, input the following command and parameters for resizing.
Specify a rectangle, whose w and h equal 100. Lock the aspect ratio, and obtain the smallest image in the extended area of the 100 x 100 rectangle.
image/resize,m_mfit,h_100,w_100
The style effect will be displayed on the right in real time. Figure 1 shows the final style effects.
- After finishing editing the image style, click OK to save the style. The new style style002 will be displayed in the style list.
- In the navigation pane, choose Objects. Click mountain.jpg in the object list to go to the file details page.
- Click the Preview Image tab to preview the effect of the current style.
- Click Copy Link. After prompted with Copied successfully, you can obtain the access address of the image file.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot