LBitmap::ExtractMessage

Summary

Extracts a message (text or file) from the specified bitmap, if the bitmap has an embedded message. The information of the extracted message is specified by the pAddMesgInfo parameter.

Syntax

#include "ltwrappr.h"

virtual L_INT LBitmap::ExtractMessage (pAddMesgInfo, uFlags = 0)

Parameters

pADDMESGINFO pAddMesgInfo

Pointer to an ADDMESGINFO structure that contains information about the extracted message.

L_UINT32 uFlags

Reserved for future use. Must be 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function is used to extract the message that was added to the bitmap by the function LBitmap::AddMessage.

Before calling this function, you must declare a variable of data type ADDMESGINFO. Set the pPassword, pStart, pDirectory members of the structure using the same information used for these members when the message was added. You can then pass the address of this structure in the pAddMesgInfo parameter, which this function will update with the extracted message.

This function can extract a message from any type of lossless image format such as bmp, tiff, lossless jpeg, and so forth. If used with lossy format types the message may be corrupted or lost.

This function supports 24- and 48-bit images, and 8- and 16-bit grayscale images.

Support for 16-bit grayscale and 48-bit color images is available only in the Document/Medical toolkits.

This function supports signed data images.

This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LBitmap__ExtractMessageExample(LAnimationWindow * LAniWnd)  
{ 
   L_INT nRet; 
   pADDMESGINFO pAddMesgInfo;  
    
   pAddMesgInfo = new ADDMESGINFO;  
    
   if(!pAddMesgInfo)  
      return -1;  
 
   memset(pAddMesgInfo, 0, sizeof(ADDMESGINFO));    
   pAddMesgInfo->uStructSize =  sizeof(ADDMESGINFO);  
   nRet =LAniWnd->ExtractMessage(pAddMesgInfo); 
   if(nRet !=SUCCESS) 
      return nRet; 
   MessageBox(NULL, pAddMesgInfo->pStrMsg, TEXT("Notice"), MB_OK);  
 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.