Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LFileSettings::SetDJVOptions
Support for the DjVu format has been discontinued effective with Version 17.
#include "ltwrappr.h"
static L_INT LFileSettings::SetDJVOptions (pOptions);
const pFILEDJVOPTIONS pOptions; |
/* pointer to a structure */ |
Sets the current options used by LEADTOOLS when loading DjVu files.
Parameter |
Description |
pOptions |
Pointer to a structure that contains the current DjVu options to set. These options will be used when loading a DjVu file. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The uStructSize member of the FILEDJVOPTIONS structure must be set before calling this function. If a DjVu file is loaded without first calling this function, the following default value is used:
FILEDJVOPTIONS member |
Default Value |
nResolution |
96 |
The values set by this function are valid for this thread. To change the values used by the current thread, call this function again, with the new values set in the FILEDJVOPTIONS structure pointed to by the pOptions parameter.
To get the current options used when loading a DjVu file, call LFileSettings::GetDJVOptions.
Required DLLs and Libraries
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
See Also
Functions: |
|
Topics: |
Loading and Saving Images |
Example
This example loads a DJV file, with a resolution defined by the user.
L_INT LFileSettings__SetDJVOptionsExample(L_TCHAR* pszDJVFileName, LBitmap* pBitmap) { L_INT nRet; FILEDJVOPTIONS DJVOptions; /* Get the current DJV option */ nRet = LFileSettings::GetDJVOptions(&DJVOptions,sizeof(FILEDJVOPTIONS)); if(nRet != SUCCESS) return nRet; /*Change Resolution */ DJVOptions.nResolution = 120; /* Set new DJV option */ nRet = LFileSettings::SetDJVOptions(&DJVOptions); if(nRet != SUCCESS) return nRet; /* Now load the DJV file */ nRet = pBitmap->Load(pszDJVFileName, 0, ORDER_RGB, NULL, NULL ); if(nRet != SUCCESS) return nRet; return SUCCESS; }