tencent cloud

All product documents
Cloud Object Storage
Persistent Image Processing
Last updated: 2024-06-25 10:53:13
Persistent Image Processing
Last updated: 2024-06-25 10:53:13

Overview

COS has integrated Cloud Infinite (CI), a one-stop professional multimedia solution that offers the image processing features outlined below. For more information, see Image Processing Overview.
Service
Feature
Description
Basic Image Processing
Proportional scaling, scaling image to target width and height, and more
Cut (regular cropping), crop (scaling and cropping), iradius (inscribed circle cropping), and scrop (smart cropping)
Adaptive rotation and common rotation
Format conversion, GIF optimization, and progressive display
Changes the quality of images in JPG and WEBP formats
Blurs images
Sharpens images
Watermarking
Obtaining image information
Includes EXIF data
Performs quick format conversion, scaling, and cropping to generate thumbnails
Sets image styles to easily manage images for different purposes


SDK API References

For the parameters and method descriptions of all the APIs in the SDK, see SDK API Reference.

Processing Image Upon Upload

The following example shows how to automatically process an image when you upload it to COS.
When the image is uploaded successfully, COS will save both the original and the processed images. You can later obtain the processing results using a general download request.

Sample code

List<PicOperationRule> rules = new LinkedList<>();
// Add a rule to convert the image to PNG format, and the processed image will be saved in a bucket with a location identifier in the format:
// examplepngobject
rules.add(new PicOperationRule("examplepngobject", "imageView2/format/png"));
PicOperations picOperations = new PicOperations(true, rules);

PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, cosPath, srcPath);
putObjectRequest.setPicOperations(picOperations);

// If the upload is successful, you will get two images: the original and the processed images
COSXMLUploadTask cosxmlUploadTask = transferManager.upload(putObjectRequest, uploadId);
Note:
For more samples, go to GitHub.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon