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 |
CosResult GetObject(const GetObjectByFileReq& request, GetObjectByFileResp* response);
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 heightreq.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 | Type | Required |
req | GetObject operation request | GetObjectByFileReq | Yes |
resp | GetObject operation response | GetObjectByFileResp | Yes |
Was this page helpful?