This Blog is all about the Alibaba Object Storage Service and Image processing performed on OSS objects . Image Processing is a great feature in OSS.
What is Object Storage Service (OSS)?
OSS is an Object Storage service provided by Alibaba Cloud. It is an encrypted and secure cloud storage service which stores, processes and accesses large amount of data from anywhere, anytime, and from any part of world, that supports pay-as-you-go pricing model.
How Effective is OSS Over the Traditional Storage Server?
1. No operational cost.
2. Storage capacity is Unlimited and it is Automatically Scalable.
3. Service Availability is 99.9% and Data Reliability is 99.9999999% with 3 replicas in 3 AZs.
4. Multi-layer protection and Anti DDoS.
5. No performance degradation while processing large number of files.
Entities in OSS
1. Region
- It is a geographical area where OSS will store the objects.
- Select the closest region to optimize the latency.
2. Bucket
- It works like a container where the objects are stored in OSS.
- Every Object must be kept in a bucket.
- The Bucket name is globally unique and once it is created cannot be changed.
- There is no limit on the number of objects in each bucket.
3. Object
- Each file of the user is an object.
- An object is a fundamental element stored in a bucket.
- It consists of data, meta-data, and keys.
- Whenever you upload an object in a bucket, you will get an URL of that object.
4. Key
- It is a unique identifier for an object within a bucket.
- Every object in a bucket has exactly one key.
OSS Operations
A. Bucket Operations
B. Web hosting and Monitoring
C. Object Operations
D. Image Processing
E. Bind a custom domain name and Anti-leech
Image Processing
Lets us do a bucket operation: Image Processing
It is one of the advanced features of Alibaba Cloud OSS. Image Processing is done on objects stored in an OSS bucket. You can process images anytime and anywhere by using the Restful API.
A list of some Image Processing operations :
- Re-size an image
- Add text watermark, image watermark
- Crop an image providing x and y coordinates
- Rotate an image with a specific degree
- Apply effects: Blur, Sharpe, Brightness, Contrast
- Convert the image format
Image processing can be done by two methods :
1. Parameter mode:
In this mode, at the end of the URL add the parameters manually. It is easy only for one operation. If there is more than one operation then it is complicated to write all the parameters in front of the URL, because that URL length becomes too long.
2.Style mode:
In this mode, there are two editing options.
1.Basic Edit
2.Advance Edit
It is very easy to perform more than one operation on images. In this mode create a style and add various effects on the image and go to the URL and just add the style name, you can see the various effects on the image and that the URL is not long although various effects applied to the image.
Demo Session
Let’s do a step by step demo with the procedure for performing image processing.
Step 1: Log in to the Alibaba Cloud console, select Object Storage Service.
Step 2: Click on the option to create a bucket.
In the below picture, the bucket name is ishita and the bucket is created in the region India (Mumbai).
Step 3: After the bucket creation, upload the objects in the bucket.
Once the object is uploaded to the bucket, you will get the URL.
In the picture below I uploaded a butterfly image.
The URL clarifies the uploaded object, in which bucket and the region of the bucket.
Step 4: Image processing in the parameter mode. In this mode, I have performed image rotation operation, rotating the image by 45 degrees. To perform this operation, I took the object URL and added the parameter shown below.
Step 5: Image processing in the style mode. Select data processing in the bucket and click on image processing. Then click on create rule.
Apply various operations on the image with the help of the edit option.