IQL is a JSON object, reffered to as the "IQL Tree", describing steps to take in order to modify images.
The IQL Tree consists of three main parts, which control the actions to take in the lifecycle, and are all required.
The Init block controls what actions to take upon initialization of the script, such as loading images for modification.
This example uses the LOAD_IMAGE action.
{
"Init": {
"Actions": [
{
"ActionType": "LOAD_IMAGE",
"Url": "https://res.discorddungeons.me/icon.png",
"ImageName": "image1"
}
]
}
...
}
The Generate block controls what actions to take upon the generation phase of the script, mainly which modifications to apply to images.
This example uses the MODIFY_IMAGE action.
{
...
"Generate": {
"Actions": [
{
"ActionType": "MODIFY_IMAGE",
"ImageName": "image1",
"Properties": {
"Grayscale": true
}
}
]
},
...
}
The Return block controls what actions to take upon the return phase of the script, mainly what images to return.
This example uses the RETURN_IMAGE action.
{
...
"Return": {
"Actions": [
{
"ActionType": "RETURN_IMAGE",
"ImageName": "image1"
}
]
}
}