Gets the information saved by the last L_SetSaveResolution.
L_LTFIL_API L_INT L_GetSaveResolution(puCount, pResolutions)
Address of the puCount variable to be updated with the number of resolutions set by L_SetSaveResolution.
Pointer to the array of DIMENSION structures to be updated with the physical resolutions set by the last call to L_SetSaveResolution. You can pass NULL if you only want to update the count variable.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Currently, this function only works with the JBIG format.
You must allocate the array to be updated. One way to do this is to declare an array of the maximum size (29 elements). Another way is to call this function twice the first time with NULL in the
pResolutions parameter, so that you can get the number of elements and allocate storage of the appropriate size.
For JBIG files, only pResolutions.nWidth and pResolutions.nHeight are used when a save operation is performed. However, the exact values specified in the last call to L_SetSaveResolution are returned.
Win32, x64, Linux.
This example gets the dimensions set by
the last call to L_SetSaveResolution and displays them
L_TCHAR szMessage; /* MessageBox string */
L_UINT uCount; /* variable to be updated with the number of resolutions */
pDIMENSION pDimensions; /* Pointer to the array to be updated */
HGLOBAL hDimensions; /* Handle to the buffer for the array */
L_UINT i; /* loop variable */
/* Count the number of dimensions */
nRet = L_GetSaveResolution (&uCount,NULL);
if(nRet != SUCCESS)
/* Allocate memory to hold the array of DIMENSION structures */
hDimensions = GlobalAlloc(GMEM_MOVEABLE, sizeof(DIMENSION)* uCount);
pDimensions = (pDIMENSION)GlobalLock( hDimensions );
/*Get the information saved by the last nRet = L_SetSaveResolution*/
if(nRet != SUCCESS)
/*Display a message box that shows the available sizes
In the case of JBIG only pDimensions.nWidth,
pDimensions.nHeight are valid */
wsprintf (szMessage,TEXT("Available dimensions:\n"));
for(i = 0; i < uCount; ++i)
wsprintf (szMessage,TEXT("%s\n%d x %d"),szMessage,
MessageBox( NULL,szMessage, TEXT("File Information"), MB_OK );
/* Free the memory that we allocated */
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries