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. |
See Also
Example
L_INT MyFunction(L_TCHAR * pszFile)
{
LMarker MyMarker;
LBitmap Bitmap;
// load metadata info
MyMarker.Load(pszFile, 0);
// load the bitmap
Bitmap.Load(pszFile);
// modify the bitmap. In this case, flip it
Bitmap.Flip();
// set the metadata markers so they are used in the next save
MyMarker.SetAsGlobalMarkers(0);
// save the file
Bitmap.Save(TEXT("FlippedFile.jpg"), FILE_EXIF_JPEG, 0, 2, 0, NULL);
// reset the markers so they are not used for the next save
MyMarker.SetHandle(NULL, TRUE);
MyMarker.SetAsGlobalMarkers(0);
// free memory containing the metadata
MyMarker.Free();
return 0;
}