LOADINFO - Raster Imaging C API Help

LOADINFO

typedef struct _LOADINFO 
{ 
   L_UINT uStructSize; 
   L_INT Format;                /* File format */ 
   L_INT Width;                 /* Image width */ 
   L_INT Height;                /* Image height */ 
   L_INT BitsPerPixel;          /* Bits per pixel */ 
   L_INT XResolution;           /* X resolution (DPI) */ 
   L_INT YResolution;           /* Y resolution (DPI) */ 
   L_OFFSET Offset;             /* Data offset */ 
   L_UINT Flags;              /* Special flags */ 
   L_RGBQUAD rgbQuad[256];                        /* palette */ 
   L_UINT rgbColorMask[3]; /* RGB color masks */ 
   L_UINT32 uStripSize;      /* strip size before decompression */ 
   L_INT nPhotoInt;              /* color information */ 
   L_INT nPlanarConfig;       /* planar configuration information */ 
} LOADINFO, * pLOADINFO; 

The LOADINFO structure provides file format information to the LOADINFOCALLBACK function, which you can use when loading image data in a format that LEADTOOLS does not recognize. For more information, refer to the L_SetLoadInfoCallback function.

 

nPlanarConfig Planar configuration. This value is used only if Format is FILE_RAW_PACKBITS. Otherwise, it is ignored. Possible values are:
  Value Meaning
  1 Chunky
  2 Planar format

Comments

pLOADINFO is a pointer to a LOADINFO structure. Where the function parameter type is pLOADINFO, you can declare a LOADINFO variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pLOADINFO variable is necessary only if your program requires a pointer.

Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() operator to calculate this value. Functions that do not require the structure be initialized will take the total size of the structure, in bytes, as an additional function parameter.

LOADINFO_TOPLEFT, LOADINFO_TOPLEFT90 and LOADINFO_TOPLEFT270 cannot be combined.

LOADINFO_REVERSE can be combined with LOADINFO_TOPLEFT, LOADINFO_TOPLEFT90 or LOADINFO_TOPLEFT270. If LOADINFO_REVERSE is set, every line is reversed before being put into the bitmap.

To load a raw fax file, you must provide a LOADINFOCALLBACK by calling L_SetLoadInfoCallback. If you recognize the file and you know the height and width of the file, set LOADINFO.Width and LOADINFO.Height to a positive value. To automatically detect the width and height of the fax file, set LOADINFO.Width and LOADINFO.Height to -1.

To load raw uncompressed data, set the Format field to FILE_RAW. Valid values must be set for the following LOADINFO fields: Width, Height, BitsPerPixel, Offset (byte location in the file where the raw data begins). If each line of RAW data is padded so that the number of bytes is a multiple of 4 (as is the case with raw Windows BMP data), include LOADINFO_PAD4 in the Flags field. Include an orientation flag in the Flags field to load the data with the proper orientation. For example, raw Windows BMP data is stored with a BOTTOM_LEFT orientation. If the orientation is unknown, include the TOP_LEFT flag. If the raw data is 8 bits per pixel or less, then the image is palettized and a palette must be generated. If this is the case, include the LOADINFO_PALETTE flag, and fill in the first (2 bits per pixel) entries of the rgbQuad field.

If the color order is RGB then include LOADINFO_ORDERRGB or LOADINFO_ORDERRGB565. If either of the LOADINFO_ORDERRGB or LOADINFO_ORDERRGB565 flags are not included, the data will be loaded as ORDER_BGR.

Help Version 20.0.2018.7.30
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help