Dynamsoft Panorama - API Reference
Functions
Advanced Setting Functions

Functions

DPS_API int DPS_InitRuntimeSettingsWithString (void *hStitcher, const char *pJsonSetting, char error[], int errorMsgBufferLen)
 
DPS_API int DPS_OutputSettingsToStringPtr (void *hStitcher, char **content)
 
DPS_API void DPS_FreeSettingsString (char **content)
 
DPS_API int DPS_SetBlockImgSavePath (void *hStitcher, const char *path)
 

Function Documentation

◆ DPS_FreeSettingsString()

DPS_API void DPS_FreeSettingsString ( char **  content)

Frees memory allocated for runtime settings string.

Parameters
[in]contentThe runtime settings string.
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
char error[256];
int ret = DPS_InitRuntimeSettingsWithString(panorama, "{\"PreviewImgScaleRatio\": 0.25, \"ResultImgScaleRatio\":1}", error, 256);
char* pContent = NULL;
DPS_OutputSettingsToStringPtr(panorama, &pContent);

◆ DPS_InitRuntimeSettingsWithString()

DPS_API int DPS_InitRuntimeSettingsWithString ( void *  hStitcher,
const char *  pJsonSetting,
char  error[],
int  errorMsgBufferLen 
)

Initializes Panorama settings with the parameters obtained from a JSON string.

Parameters
[in]hStitcherHandle of the Panorama instance.
[in]pJsonSettingA JSON string that represents the content of the settings.
[in,out]errorThe buffer is allocated by the caller. The recommended length is 256. The error message will be copied to the buffer.
[in]errorMsgBufferLenThe length of the allocated buffer.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
char error[256];
int ret = DPS_InitRuntimeSettingsWithString(panorama, "{\"PreviewImgScaleRatio\": 0.25, \"ResultImgScaleRatio\":1}", error, 256);
See also
C Functions

◆ DPS_OutputSettingsToStringPtr()

DPS_API int DPS_OutputSettingsToStringPtr ( void *  hStitcher,
char **  content 
)

Outputs runtime settings to a string.

Parameters
[in]hStitcherHandle of the Panorama instance.
[in,out]contentThe output string which stores the contents of current settings.
Returns
Returns error code. Returns 0 if the function operates successfully. You can call DPS_GetErrorString() to get detailed error message.
Code Snippet:
void* panorama = DPS_CreateInstance();
DPS_InitLicense(panorama, "t0260NwAAAHV***************");
char error[256];
int ret = DPS_InitRuntimeSettingsWithString(panorama, "{\"PreviewImgScaleRatio\": 0.25, \"ResultImgScaleRatio\":1}", error, 256);
char* pContent = NULL;
DPS_OutputSettingsToStringPtr(panorama, &pContent);
Remarks:
Changing the parameter value in the output string and calling DPS_InitRuntimeSettingsWithString is also one of ways to init runtime settings.

◆ DPS_SetBlockImgSavePath()

DPS_API int DPS_SetBlockImgSavePath ( void *  hStitcher,
const char *  path 
)

Set the save path of small block images.

Parameters
[in]pathThe save path of small block images.