tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Basic Image Processing

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-02-29 16:13:43

Overview

COS has integrated Cloud Infinite (CI), a one-stop professional multimedia solution that offers the image processing features as outlined below. For more information, see Image Processing Overview.
Service
Feature
Description
Basic image processing
Proportional scaling, scaling image to target width and height
Regular cropping, cropping and scaling, cropping to circle, smart face cropping
Adaptive rotation, regular rotation
Format conversion, GIF format optimization, progressive display
Quality change for JPG and WebP images
Image blurring
Image sharpening
Watermarking
Image information acquisition
Including EXIF information
Quick image format conversion, scaling, and cropping for thumbnail generation
Image style configuration for easy image management


Basic Image Processing

Scaling

Feature description

Proportional scaling, scaling image to target width and height, etc.

Method prototype

CosResult GetObject(const GetObjectByFileReq& request, GetObjectByFileResp* response);

Sample request

qcloud_cos::CosConfig config("./config.json");
qcloud_cos::CosAPI cos(config);
std::string bucket_name = "examplebucket-1250000000";

qcloud_cos::GetObjectByFileReq req(bucket_name, object_name, local_file);
// Scale an image to 50% of its original width and height
req.AddParam("imageMogr2/thumbnail/!50p", "");
qcloud_cos::GetObjectByFileResp resp;
qcloud_cos::CosResult result = cos.GetObject(req, &resp);
if (result.IsSucc()) {
// The call is successful. You can call the `resp` member functions to get the return content.
} else {
// The call failed. You can call the `result` member functions to get the error information.
}

Parameter description

Parameter
Description
Type
Required
req
GetObject operation request
GetObjectByFileReq
Yes
resp
GetObject operation response
GetObjectByFileResp
Yes

Cropping

Feature description

Similar to the scaling operation.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan