LOADINFO
typedef struct _LOADINFO
{
   L_INT Format; /* File 
 format: FILE_PCX, ... */
   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_UINT32 Offset; /* 
 Data offset */
   L_UINT32 Flags; /* Special 
 flags */
   RGBQUAD rgbQuad[256]; /* palette */
} LOADINFO, L_FAR * pLOADINFO;
The LOADINFO structure provides file format information to the LBaseFile::LoadInfoCallBack function, which you can use when loading image data in a format that LEADTOOLS does not recognize. For more information, refer to the LBaseFile::EnableLoadInfoCallBack function.
| Member | Description | 
| Format | File format. The following are valid formats: | 
| 
 | FILE_FAX_G3_1D | [66] Raw FAX, compressed using CCITT group 3, 1 dimension. | 
| 
 | FILE_FAX_G3_2D | [67] Raw FAX, compressed using CCITT group 3, 2 dimensions. | 
| 
 | FILE_FAX_G4 | [68] Raw FAX, compressed using CCITT group 4. | 
| 
 | FILE_RAW | [153] Raw uncompressed data | 
| Width | Image width in pixels. | 
| Height | Image height in pixels. | 
| BitsPerPixel | Bits per pixel of the image data in the file. | 
| XResolution | Horizontal resolution for rendering the image, specified in dots per inch. This is an optional field. | 
| YResolution | Vertical resolution for rendering the image, specified in dots per inch. This is an optional field. | 
| Offset | Position of the first byte of image data. This can be 0 if your file does not have a header. | 
| Flags | Special flags, which can be specified as follows. You can use a bitwise OR to specify more than one value. | 
| 
 | LOADINFO_TOPLEFT | [0x00000001] The image has a TOP_LEFT view perspective. | 
| 
 | LOADINFO_ORDERRGB | [0x00000002] The color order is RGB. | 
| 
 | LOADINFO_WHITEONBLACK | [0x00000004] The image is white-on-black. | 
| 
 | LOADINFO_LSB | [0x00000008] The least significant bit is filled first. | 
| 
 | LOADINFO_TOPLEFT90 | [0x00000010] The image has a TOP_LEFT90 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_TOPLEFT270 | [0x00000020] The image has a TOPLEFT270 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_REVERSE | [0x00000040] Each line is reversed (mirrored). | 
| 
 | LOADINFO_TOPLEFT180 | [0x00000080] The image has a TOP_LEFT180 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_BOTTOMLEFT90 | [0x00000100] The image has a BOTTOM_LEFT90 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_BOTTOMLEFT180 | [0x00000200] The image has a BOTTOM_LEFT180 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_BOTTOMLEFT270 | [0x00000400] The image has a BOTTOM_LEFT270 view perspective. (Document/Medical only) | 
| 
 | LOADINFO_PAD4 | [0x00000800] Each line is padded to a multiple of 4 bytes. (raw data only). | 
| 
 | LOADINFO_PALETTE | [0x00001000] A palette is supplied in the rgbQuad field. (raw data only). | 
| rgbQuad | Palette for uncompressed data that is 8 bits per pixel or less. Fill in the first 2 BitsPerPixel entries in this palette and include the LOADINFO_PALETTE flag in the Flags field. | |
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.
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 override LBaseFile::LoadInfoCallBack. 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 (2BitsPerPixel) entries of the rgbQuad field.
If the color order is ORDER_RGB then include this flag. If the ORDER_RGB flag is not included, the data will be loaded as ORDER_BGR.