Multiple assets can be passed in the request. Each asset can have its own options for canvas size and initial fill color. The options for each asset are as below.
Parameter | Type | Description |
---|---|---|
canvas | JSON | (optional) Canvas options for the image. Canvas is optional if bg_add is specified |
color | string | (optional) Color to applied to the canvas on initialization. If not provided, it is set to transparent color. |
size | JSON | (optional) Size of the graphics to be added to the image. The size is specified as a JSON object with width and height . |
crop | JSON | (optional) Crop dimensions to be applied to the image. The crop dimensions are specified as JSON object with left , top , right , bottom . |
position | JSON | (optional) Position of the image asset on the canvas. The position is specified as a JSON object with x and y coordinates. Defaults to the center of the Canvas. |
disposition .create_asset | Boolean | Specifies if the output video should be added as an asset. Default to false |
disposition .add_as_conversion | Boolean | If true , outputs are added as conversions to the original asset. If false , each output is added as a new asset (consider setting inherit_metadata to true in this case) |
disposition .conversion_name | string | Name to use when adding as conversion to asset, must follow conversion name specification (30 characters max, can only be alphanumeric, spaces are not allowed), not needed if add_as_conversion is false . If add_as_conversion is true , this is mandatory. |
disposition .mode | String | Mode of adding metadata to the new asset. Can be APPEND or REPLACE |
disposition .data_schema_id | Integer | Asset Schema id of the metadata to be added to the new asset |
disposition .metadata | JSON | (optional) Specifies asset metadata |
disposition .metadata .inherit | Boolean | Whether the new_asset created should inherit all metadata of parent asset |
disposition .metadata .src_asset_id | String | Asset ID of the original asset whose metadata is to be inherited |
disposition .metadata .inherit_fields | List(String) | Metadata keys of original asset to be inherited |
disposition .metadata .data | JSON | Metadata to be added to the new asset |
Note:
-
if
crop
options is provided:-crop
dimensions ( left, top, right, bottom ) must be with respect to the original image size associated with asset id. For example, if original asset has a size of 2000x2000,crop
of [left:0, top:0, right:100, bottom:200] will crop to this region in the original image. Note that invalid crop parameters will result in incorrect outputs.- original asset is retrieved and cropped and the cropped image is then used in all processing operations.
-
if
add_as_conversion
is set totrue
, theconversion_name
must follow the conversion name specification.metadata
will be ignored. -
if
add_as_conversion
is set tofalse
,conversion_name
will be ignored.metadata
field if provided will be used to add metadata to the new asset. Ifmetadata
is not provided, the new asset will not have any metadata. -
If
inherit
is set totrue
, all source asset custom metadata fields (includingdata_scheme_id
) will be inherited ifinherit_fields
field is not provided. Ifinherit
is set tofalse
, thedata
field will be used to add metadata to the new asset. -
If
inherit
is set tofalse
anddata
field is not provided, the new asset will not have any metadata.