Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_LoadExtensionStamp
#include "l_bitmap.h"
L_LTFIL_API L_INT L_LoadExtensionStamp(pExtensionList, pBitmap, uStructSize)
pEXTENSIONLIST pExtensionList; |
/* pointer to a structure */ |
pBITMAPHANDLE pBitmap; |
/* pointer to a bitmap handle */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pBitmap */ |
Loads a stamp from the specified extension list.
Parameter |
Description |
pExtensionList |
Pointer to the EXTENSIONLIST structure that contains the stamp to load. |
pBitmap |
Pointer to the bitmap handle that references the bitmap to be updated with the stamp loaded from the specified extension list. |
uStructSize |
Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE). |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The extensions referenced by the pExtensionList parameter must be loaded by calling the L_ReadFileExtensions function.
Required DLLs and Libraries
LTFIL 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, Mobile.
See Also
Functions: |
L_ReadFileExtensions, L_GetExtensionAudio, L_FreeExtensions, L_ReadFileStamp |
Topics: |
Raster Image Functions: Getting and Setting File Information |
|
|
|
Example
L_INT LoadExtensionStampExample(HWND hWnd, L_TCHAR * pszName, pBITMAPHANDLE pBitmap) { pEXTENSIONLIST pExtensionList; L_INT nRet; L_TCHAR s[300]; nRet = L_ReadFileExtensions(pszName, &pExtensionList, NULL); if(nRet != SUCCESS) { wsprintf(s, TEXT("Error %d getting extensions!"), nRet); MessageBox(hWnd, s, TEXT("ERROR"), MB_OK); return nRet; } if(pExtensionList->uFlags & EXTENSION_STAMP) { if(pBitmap->Flags.Allocated) L_FreeBitmap(pBitmap); nRet = L_LoadExtensionStamp(pExtensionList, pBitmap, sizeof(BITMAPHANDLE)); if (nRet != SUCCESS) { wsprintf(s, TEXT("Error %d loading the stamp"), nRet); MessageBox(hWnd, s, TEXT("ERROR"), MB_OK); return nRet; } } else MessageBox(hWnd, TEXT("The extensions do not contain a stamp"), TEXT("ERROR"), MB_OK); L_FreeExtensions(pExtensionList); return SUCCESS; }