L_MrcLoadBitmap

#include "ltsgm.h"

L_INT EXT_FUNCTION L_MrcLoadBitmap(pszFileName, pBitmap, uStructSize, nPageNo, pfnCallback, pUserData)

L_TCHAR L_FAR * pszFileName;

/* name of the file to load */

pBITMAPHANDLE pBitmap;

/* pointer to the target bitmap handle */

L_UINT uStructSize;

/* size in bytes, of the structure pointed to by pBitmap */

L_INT nPageNo;

/* page number */

FILEREADCALLBACK pfnCallback;

/* reserved for future use */

L_VOID L_FAR * pUserData;

/* reserved for future use */

Loads an MRC image file into a bitmap. The file can be in any supported image file format. This function is available in the (Document/Medical) toolkits.

Parameter

Description

pszFileName

Character string containing the name of the file to load.

pBitmap

Pointer to the bitmap handle referencing the target bitmap.

uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

nPageNo

The page number of a multi-page file, which can contain more than one image. When loading a file, this is the exact page number. For more information on multi-page files refer to Multipage File Formats.

pfnCallback

Reserved for future use. Pass NULL.

pUserData

Reserved for future use. Pass NULL.

Returns

SUCCESS

The function was successful.

<= 0

An error occurred. Refer to Return Codes.

Comments

This function loads the MRC image files that were saved using either LEAD Proprietary T44 Format or Standard T44 Format.

Note: You can also use L_LoadBitmap to load the MRC image file.

Required DLLs and Libraries

LTSGM

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

See Also

Functions:

L_MrcSaveBitmapT44, L_MrcSaveBitmap, L_MrcGetPagesCount, L_MrcSegmentBitmapExt

Topics:

Loading Capabilities

 

MRC Bitmap Functions: Loading Pages

Example

L_INT OpenBitmap(L_TCHAR L_FAR* pszFileName, pBITMAPHANDLE pBitmap)
{
   L_INT nRet;
   
   /* Load the MRC file that saved in the LEAD or Standard T44 format*/
   nRet = L_MrcLoadBitmap (pszFileName, pBitmap, sizeof(BITMAPHANDLE), 1, NULL, NULL);
   if (nRet != SUCCESS)
      return nRet;

   return SUCCESS;
}