Workflows in Solidgrids
Solidgrids provides a powerful tool for processing images, the concept of "workflows". A workflow defines how the images will be processed and specifies the configurations for the background removal and the size of the output image.
Background Removal
The workflow allows you to specify the color to replace the background with, using the background field in the workflow definition. By default, the background type is set to "plain", and the color can be specified using a hexadecimal color code.
Size Configuration
The workflow also allows you to specify the aspect ratio of the output image, using the aspect field in the size field of the workflow definition. The aspect ratio is a float that represents the relationship between the width and height of the image.
Using a Workflow
There are two ways to define a workflow:
On the page "https://app.solidgrids.com/app/settings", where you can configure the default workflow that will be used for all images uploaded to the Solidgrids service.
Through the body data when making a POST request to the endpoint "https://app.solidgrids.com/api/pipe". In this case, you can specify the workflow in the body data of the request, using the following format:
workflow: {
size: {
aspect: 1.0, # 1:1
},
background: {
type: "plain",
color: "#ffff",
},
}
By default, the workflow created on the settings UI is used. If a workflow is passed through the post body, it overrides the default workflow. The workflow configurations will be applied to the images being processed.