tencent cloud

All product documents
Video on Demand
Real-Time Image Processing
Last updated: 2022-12-01 16:33:03
Real-Time Image Processing
Last updated: 2022-12-01 16:33:03

Overview

This document shows you how to create a template in the VOD console to process images in real time. The processing is based on URLs, which allows quick image generation.
Note:
The original image cannot be larger than 32 MB. Its dimensions cannot exceed 30,000 pixels and its resolution cannot exceed 250 million pixels. The dimensions of the output image cannot exceed 9,999 pixels.

Directions

Step 1. Upload images

1. Log in to the VOD console and select Application Management on the left sidebar.
2. Find the target application and click its name.
3. By default, you will be directed to Media Assets > Video/Audio Management > Uploaded.
4. Select Image Management on the left sidebar and click Upload Image to upload an image.

Step 2. Create a template

1. Select Media Processing > Template Settings on the left sidebar and click Image Processing Template.
2. In addition to the preset templates listed on the page, you can also create your own template. The screenshots below show how to create a template to generate 240 x 240 thumbnails.




3. After a template is created successfully, it will appear in the template list, and a template ID will be generated for it.



Step 3. Learn about URL-based image processing

VOD processes images based on URLs.

URL of the processed image = URL of the original image + Separator + Image template ID + “.” + Output image format

URL of the original image: The accelerated URL generated after an image is uploaded to VOD.
Separator: !
Output image format: JPG, JPEG, PNG.

Step 4. Learn about the processing types

There are two processing types: scaling and cropping.
Type
Operation
Scaling
Width: Specified; height: Auto-scaled
Height: Specified; width: Auto-scaled
Long side: Specified; short side: Auto-scaled
Short side: Specified; long side: Auto-scaled
Width: Specified; height: Specified
Cropping
Cropping to circle, with the radius specified
Cropping to rectangle, with height and width specified

Examples for scaling

Width: Specified; height: Auto-scaled
Template ID: 13290; width: 700; output format: PNG.
The URL of the processed image is: https://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/0f9d472c387702299328320141/Cov1ATJ3AYYA.jpg!13290.PNG
Result:


Height: Specified; width: Auto-scaled
Template ID: 13291; height: 700; output format: PNG.
The URL of the processed image is: http://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/0f9d472c387702299328320141/Cov1ATJ3AYYA.jpg!13291.PNG
Result:


Long side: Specified; short side: Auto-scaled
Template ID: 13292; long side: 300; output format: PNG.
The URL of the processed image is: https://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/0f9d472c387702299328320141/Cov1ATJ3AYYA.jpg!13292.PNG
Result:


Short side: Specified; long side: Auto-scaled
Template ID: 13293; short side: 300; output format: PNG.
The URL of the processed image is: https://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/0f9d472c387702299328320141/Cov1ATJ3AYYA.jpg!13293.PNG
Result:


Width: Specified; height: Specified
Template ID: 13294; height: 300; width: 300; output format: PNG.
The URL of the processed image is: https://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/0f9d472c387702299328320141/Cov1ATJ3AYYA.jpg!13294.PNG
Result:



Examples for cropping

Cropping to circle
Template ID: 13295; radius: 300; output format: PNG.
The URL of the processed image is: http://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/182b0f2a387702299461251102/EOy4fI1V8gQA.jpg!13295.PNG
Result:


Cropping to rectangle
Template ID: 13296; output height: 300; output width: 300; output format: PNG.
The URL of the processed image is: http://1500012191.vod2.myqcloud.com/6caaa776vodcq1500012191/23c473bb387702299461744409/HVSbBfQq3JgA.jpg!13296.PNG
Result:


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 avaliable.

7x24 Phone Support