Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LBase::LoadInfoCallBack

Show in webframe

#include "ltwrappr.h"

virtual L_INT LBase::LoadInfoCallBack(fd, pInfo)

L_HFILE fd;

/* file handle */

pLOADINFO pInfo;

/* pointer to a structure */

Handles input data that is in a format (such as raw FAX) that LEADTOOLS cannot recognize.

Parameter

Description

fd

The Windows file handle of the file to load.

pInfo

Pointer to the LOADINFO structure that supplies information about the file that LEADTOOLS needs.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Override this function if you wish to handle unrecognized image data.

This function also loads raw FAX data (CCITT Group 3 or Group 4) or raw uncompressed data.

This function handles input data that is in a format (such as raw FAX) that LEADTOOLS cannot recognize. This function will be called only if the load info callback is enabled. When loading an image from a file, a LEADTOOLS function normally determines the file format from the file header, and if the format is unrecognized, the function returns an error. You can override this function to change that behavior by supplying the information that LEADTOOLS needs when loading an image from a file.

To load raw uncompressed data, you must override LBase::LoadInfoCallBack. Set the LOADINFO.Format field to FILE_RAW. Valid values must also be set for the following LOADINFO fields: Width, Height, BitsPerPixel, Offset (byte location in file where 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 LOADINFO.Flags field. Include an orientation flag in the LOADINFO.Flags field to load 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.

To supply the needed information, refer to the LOADINFO structure description.

Note:

More options are available in the LOADFILEOPTION structure.

Required DLLs and Libraries

LTKRN

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

Win32, x64.

See Also

Functions:

Class Members

Topics:

Raster Image Functions: Input and Output

 

Loading and Saving Images

Example

For an example, refer to LFile::StartFeedLoad.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.