Overview
Introduction
Image processing is a feature integrated in Object Storage Service (OBS). It provides stable, secure, efficient, and inexpensive image processing services. By using this feature, you can slim, crop, resize, and watermark images, as well as convert the formats of images.
You can access this feature via OBS Console and REST APIs, to process images stored in OBS anytime and anywhere and obtain the processed images right away.
Application Scenarios
Image processing enables you to resize, crop, or compress images on cloud. You do not have to download space-consuming software to your local computers.
For example, you can add effects to or resize images in your cloud album anytime and anywhere, and quickly share the images with your friends online.
Shopping or other likewise websites where images are frequently accessed can use image processing to simply process the images and delivers them to Content Delivery Network (CDN) for acceleration. The processed images can then be faster downloaded from CDN.
Architecture
You can upload your images to OBS using OBS Console, OBS Browser+, REST APIs, or third-party clients. Before downloading and using an image, you can create an image style or pass image processing parameters to process it, such as cropping and compressing the image. After processing, you can obtain the URL of the new image. Furthermore, you can deliver the new image to CDN for acceleration and directly download it from CDN when needed. Figure 1 shows the flowchart of image processing.
After processing, new images will be directly displayed in a browser and are not stored in OBS, so they do not incur any storage costs.
Billing
Image processing is currently free of charge.
Ways to Use Image Processing
You can access image processing in either of the following ways:
- Using OBS Console
On the image processing page, you can create a processing style for an image by specifying parameters on the GUI or by editing code. You can then view the new image effect on the Preview Image tab page on the image's details page. You can also click Copy Link to get the link for accessing the new image.
To get started with image processing on OBS Console, see Using Image Processing on OBS Console.
- Using the REST API
You can call OBS Representational State Transfer (REST) APIs to access image processing. In the REST architectural style, resources on a network are identified by Uniform Resource Identifiers (URIs) and applications on clients locate resources using Uniform Resource Locators (URLs). The URL is in the https://Endpoint/uri format. By putting a URL that complies with the command rules of image processing in a browser, you can get the new image after processing. For more information, see the Object Storage Service API Reference.
To get started with image processing with API, see Using Image Processing with APIs.
Image Processing Functions
Table 1 describes what you can do on images stored in OBS by using image processing.
Function |
Description |
How to Use |
---|---|---|
Returns an image's basic information, including the format, size, and average color value. |
Making an API call |
|
Adjusts an image's effects, including the brightness, contrast, sharpness, and blur. |
Using GUI on OBS Console Editing code on OBS Console Making an API call |
|
Resizes images based on a specified width, height, or percentage. |
Editing code on OBS Console Making an API call |
|
Adds a text watermark, an image watermark, or both of them to a specific position of an image. Text watermarks can have a color, font, and size configured, and image watermarks can be resized, rotated, or cropped before being added to images. |
Using GUI on OBS Console Editing code on OBS Console Making an API call |
|
Converts images to various formats, and supports interlaced rendered images after conversion. |
Using GUI on OBS Console Editing code on OBS Console Making an API call |
|
Rotates images clockwise, and automatically rotates images based on the recorded rotation information of cameras or smartphones. |
Editing code on OBS Console Making an API call |
|
Crops images based on the specified width, height, radius of the inscribed circle, index, and radius of rounded corners. |
Editing code on OBS Console Making an API call |
|
Compresses JPG images based on the relative quality and absolute quality. |
Editing code on OBS Console Making an API call |
|
Reduces the image size without compromising its quality. |
Editing code on OBS Console Making an API call |
|
Synchronously stores images after processing in a specified OBS bucket for you to directly access the processed images. |
Editing code on OBS Console Making an API call |
|
Orchestrates multiple process commands in sequence. With this function, you can add multiple process commands to the URL of the image that you want to process, and separate each command using the designated delimiter. Then the commands are executed one by one from left to right. |
Editing code on OBS Console Making an API call |
|
Customizes image styles for you to batch process images that require the same processing operations. |
Using GUI on OBS Console Editing code on OBS Console |
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