L_SetJBIG2Options

#include "l_bitmap.h"

L_LTFIL_API L_INT L_SetJBIG2Options(pOptions)

Sets the file options used by LEADTOOLS for saving JBIG2 files.

Parameters

pFILEJBIG2OPTIONS pOptions

Pointer to the FILEJBIG2OPTIONS structure that contains the options to be used for saving JBIG2 files.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The FILEJBIG2OPTIONS.uStructSize member must be set before calling this function.

The values set by this function are valid for the current thread. To change the values used by the current thread, this function must be called again.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

This example will make it so the next time you save a JBIG2 file, it will be saved with Template #3

L_INT SetJBIG2OptionsExample(L_VOID) 
{ 
   L_INT nRet; 
   FILEJBIG2OPTIONS JBIG2Options; 
 
   // get the current values. I only want to change the template 
   nRet = L_GetJBIG2Options(&JBIG2Options, sizeof(FILEJBIG2OPTIONS)); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // set the Image template value to 3 
   JBIG2Options.ucImageTemplateType = 3; 
   JBIG2Options.ucTextTemplateType = 3; 
 
   // set the compression options. The next time I save a  
   // JBIG2 file, it will be saved with te mplate # 3 
   nRet = L_SetJBIG2Options(&JBIG2Options); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help