LMarker::SetAsGlobalMarkers

#include "ltwrappr.h"

virtual L_INT LMarker::SetAsGlobalMarkers(uFlags)

L_UINT uFlags;

reserved flags

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

Parameter

Description

uFlags

Reserved for future use. Pass 0.

Returns

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

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.

See Also

Functions:

LMarker::Copy, LMarker::Create, LMarker::Delete, LMarker::DeleteIndex, LMarker::Enum, LMarker::EnumMarkersCallBack, LMarker::Free, LMarker::GetCount, LMarker::GetHandle, LMarker::GetGlobalMarkers, LMarker::GetMarker, LMarker::Insert, LMarker::Load, LMarker::SetHandle, LFile::WriteMetaData, Class Members

Topics:

Raster Image Functions: Markers

 

Working with Markers

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 20.0.2020.4.5
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help