Our HD Colour Migration API is designed to enhance the colors of high-definition images by intelligently applying color transformations while preserving the natural hues of portrait subjects. Leveraging advanced image processing algorithms, this API ensures that the overall color dynamics of your HD images are enriched without altering the skin tones and colors of any people in the picture. This makes it ideal for photographers, graphic designers, and digital content creators who need to enhance the vibrancy and appeal of their images while maintaining the integrity of portrait subjects. Integrate our HD Colour Migration API into your workflow to achieve visually stunning results, ensuring that your images are both dynamic and true to life. Perfect for professional photography, advertising, and any application where high-quality imagery is crucial. This interface is compared to Colour migration:
Support high-definition pictures.
Support custom color extension.
Support portrait color preservation.
Automatic color extension
Enter the number of results to be expanded, that is, the number of expanded color systems. The algorithm calculates the uniform sampling method according to the color space, and gives the results that meet the requirements of the number of expanded colors. Simply put, the number of color systems is how many, and a few pictures are output.
For example, 【Before processing】【color_count
=1
】【color_count
=4
】. The result is as follows:
Color palette extension
Input a set of color lists (color swatches), and the algorithm uses the swatches as the main color to expand the original image. This mode provides greater color control. The length of the color list must not exceed the specified value.
For example, 【color_template
="#DB0D0D,#0E0CBB,#FF0000"】. The color extension result is as follows:
Before processing | After processing |
---|---|
Reference picture extension color
You provide a reference image, and the algorithm will colorize the original image based on the reference image.
Before processing | Reference map | After processing |
---|---|---|
HD Colour migration
(Async)This API is asynchronous. Please save the task_id
or request_id
and then use 'Retrieve Task Results by task_id
’ or 'Retrieve Task Results by request_id
’ to obtain the task results.
Image requirements
Image formats: PNG
, JPG
, JPEG
.
Image size: no more than 3 MB.
Image resolution: greater than 64x64 pixels and less than 10000x10000 pixels.
All images must be RGB 3-channel.
Request Parameters
Field | Required | Type | Scope | Example | Defaults | Description |
---|---|---|---|---|---|---|
image |
YES | file | - | - | - | The original image. |
degree |
YES | string | 0~1 | 0.4 | - | Degree of extension. |
mode |
NO | string | AUTO TEMPLATE REF_PIC |
AUTO |
AUTO |
Color extension mode. AUTO : Automatic color extension. TEMPLATE : Color palette extension. REF_PIC : Reference picture extension color. |
color_count |
NO | integer | 1 2 3 4 5 6 7 8 |
1 |
1 |
Automatic color extension. Expand the number of shades. This parameter is valid when mode : AUTO . |
color_template |
NO | string | - | 056A6B,0A0B0C |
- | Color palette extension. Top main color list, color value definition ARGB. When there are multiple colors, use , to separate. Length: [1, 7]. When mode : TEMPLATE , this parameter is required and valid. |
ref |
NO | file | - | - | - | Refer to the picture for color extension. When mode : REF_PIC , this parameter is required and valid. |
Field | Type | Description |
---|---|---|
error_code |
integer | Error Code. |
error_msg |
string | Error Message. |
request_id |
string | Request ID. |
task_id |
string | Task ID. |
Retrieve Task Results by task_id
Retrieve asynchronous task results by task_id
. An API more efficient than 'Retrieve Task Results by request_id
'.
Field | Required | Type | Description |
---|---|---|---|
task_id |
YES | string | Task id:task_id |
Field | Type | Description |
---|---|---|
error_code |
integer | Error Code. |
error_msg |
string | Error Message. |
request_id |
string | Request ID. |
task_status |
integer | Asynchronous task status. 0 : The task is queued. 1 : Asynchronous processing. 2 : Processing was successful. |
data |
object | The content of the result data returned. |
+status |
string | Asynchronous task status. QUEUING : The task is queued. PROCESSING : Asynchronous processing. PROCESS_SUCCESS : Processing was successful. PROCESS_FAILED : Processing failed. TIMEOUT_FAILED : The task timeout did not complete. LIMIT_RETRY_FAILED : Exceeded maximum number of retries for processing failures. |
+image_list |
array | The real request result returned by HD color migration asynchronous task. Note: The URL address is a temporary address, valid for 24 hours, and will not be accessible after the expiration date. |
Retrieve Task Results by request_id
Retrieve asynchronous task results by request_id
.
Field | Required | Type | Scope | Example | Description |
---|---|---|---|---|---|
job_id |
YES | string | - | 3A9BFC5E-3F7C-4D9A-9445-908C6D14AB5B | Task id:request_id |
type |
YES | string | HD_COLOUR_MIGRATION |
HD_COLOUR_MIGRATION |
Asynchronous task type. HD_COLOUR_MIGRATION : HD Colour migration |
Field | Type | Description |
---|---|---|
error_code |
integer | Error Code. |
error_msg |
string | Error Message. |
request_id |
string | Request ID. |
data |
object | The content of the result data returned. |
+status |
string | Asynchronous task status. QUEUING : The task is queued. PROCESSING : Asynchronous processing. PROCESS_SUCCESS : Processing was successful. PROCESS_FAILED : Processing failed. TIMEOUT_FAILED : The task timeout did not complete. LIMIT_RETRY_FAILED : Exceeded maximum number of retries for processing failures. |
+image_list |
array | The real request result returned by HD color migration asynchronous task. Note: The URL address is a temporary address, valid for 24 hours, and will not be accessible after the expiration date. |