L_SetDJVOptions

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_SetDJVOptions (pOptions);

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 L_GetDJVOptions.

Required DLLs and Libraries

LTFIL
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP.

See Also

Functions:

L_GetDJVOptions

Topics:

Loading and Saving Images

 

Raster Image Functions: Loading Files

Example

/* This example loads a DJV file, with a resolution
defined by the user */

void LoadDJVFile(L_TCHAR *pszDJVFileName, pBITMAPHANDLE  pBitmap, L_INT nDisplayDepth)
{
   FILEDJVOPTIONS DjvOptions;

   /* Get the current DJV option */
   L_GetDJVOptions(&DjvOptions,sizeof(FILEDJVOPTIONS));

   /*Change Resolution */
   DjvOptions. nResolution = 120;

   /* Set new DJV option */
   L_SetDJVOptions(&DjvOptions);

   /* Now load the DJV file */
   L_LoadBitmap(pszDJVFileName, pBitmap, sizeof(BITMAPHANDLE), 0, ORDER_RGB, NULL,     NULL);
}