Processing files with external web services using Curl
This can for example be a web service that offers processing of images, such as the automatic removal of the image background. Many different types of services exist that offer interaction via curl. Color Factory will issue a curl command per file, where you insert the variables %%INFILE and %%OUTFILE in the syntax to comply with the external system's syntax requirements.
%%INFILE resolves to the path to the input file in the channel's input folder, and %%OUTFILE resolves to the resulting file in the channel's output folder.
Installing Curl
With Windows server 2012 and 2016 you will need to first download and install Curl. It can be obtained at this external address: https://curl.haxx.se/windows/
Note that Windows Server 2019 includes curl - the executable is found at C:\Windows\system32\curl.exe
Configuring Curl
Where: Channel | Pixel Edit | Curl Online Processing tab
Tick Enable online processing with curl and fill in the location of the curl executable file. The screenshot above sis taken on a Windows Server 2019, where curl is included.
In the Command line field, fill in the command line as specified by the external service. The screenshot shows an example syntax from remove.bg, an online service for removing the background in pictures. Note that the syntax in the screenshot won't work, as you will need to purchase a working API key from remove.bg to use with your integration.