LMarker::SetAsGlobalMarkers

Summary

Sets the metadata markers to be used in the current thread.

Syntax

#include "ltwrappr.h"

virtual L_INT LMarker::SetAsGlobalMarkers(uFlags)

Parameters

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

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

Comments

All save operations performed in this thread will use these markers until LMarker::SetAsGlobalMarkers is called again.

A copy of these markers will be used, so you can delete the marker object when LMarker::SetAsGlobalMarkers returns.

Comments set with LFileSettings::SetComment will take precedence over any comments contained in the markers.

Tags set with LFileSettings::SetTag will take precedence over any user-defined tags contained in the markers.

If the LFile::SaveXXX function is instructed to save a stamp, the stamp will be regenerated from the bitmap and will override whatever Exif stamp is present in the markers.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LMarker__SetAsGlobalMarkersExample(L_TCHAR * pszFile) 
{ 
   L_INT nRet; 
   LMarker   MyMarker; 
   LBitmap   Bitmap; 
 
   // load metadata info 
   nRet = MyMarker.Load(pszFile, 0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // load the bitmap 
   nRet = Bitmap.Load(pszFile); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // modify the bitmap. In this case, flip it 
   nRet = Bitmap.Flip(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // set the metadata markers so they are used in the next save 
   nRet = MyMarker.SetAsGlobalMarkers(0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // save the file  
   nRet = Bitmap.Save(MAKE_IMAGE_PATH(TEXT("FlippedFile.jpg")), FILE_EXIF_JPEG, 0, 2, 0, NULL); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // reset the markers so they are not used for the next save 
   nRet = MyMarker.SetHandle(NULL, TRUE); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = MyMarker.SetAsGlobalMarkers(0); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // free memory containing the metadata 
   nRet = MyMarker.Free(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 22.0.2023.2.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.