In this tutorial you will learn how to create custom presets in order to export to our SDK, WebAPI or Container solutions.
The Easy Way
The simplest way to get image correction parameters into any of our business solutions is to ‘Export Preset’ to a .preset file. To do this, select the preset you would like to use in the SDK, WebAPI, or Container, then switch to List View in the Presets Panel, then click the Gear icon, and click Export preset.
Give the preset file a useful name, and this saves all the settings in that Preset as a .preset file. These can be loaded in our SDK using PFC_ReadPreset() function, and can be uploaded to our WebAPI or used in our docker Container solution. This can be done in any of our desktop software applications.
The Code Way
For our SDK, there are times when loading all parameters from a .preset file is not the best approach. You might offer a button or feature to your customers to toggle Noise Reduction on or off, for example. In this case, it’s easier to code in a way to enable, disable or set individual image parameters instead of loading in all parameters available in a .preset file.
In these cases, you can use the ‘Export to API’ entry in the Edit menu:
This will create a plain text file that includes every parameter in both valid code for both C and C#. It looks like this:
param.core.bEnabled=true; param.core.bAbnormalTintRemoval=false; param.core.eTintMode=TINTCORRECT_AGGRESSIVE; param.core.fTintScale=0.49f; param.core.bVibrancy=true; param.core.iVibrancy=0; param.core.bUseAutomaticStrengthSelection=true; param.core.eAggressiveness=AGGRESSIVENESS_AGGRESSIVE
With this, you can easily copy/paste this into your source code in any way you need to. A button to enable Noise Reduction would just need to run this line of code:
And similar features would be available for Beautify corrections, gradient filters, finishing tools, or any of our other corrections or filters.
This method of exporting settings is available in our Business-focused desktop applications (Workbench and QuickDesk).