summaryrefslogtreecommitdiff
path: root/samples/source/XMPFilesCoverage.cpp
diff options
context:
space:
mode:
authorHubert Figuiere <hub@figuiere.net>2010-07-03 18:47:03 -0700
committerHubert Figuiere <hub@figuiere.net>2010-07-03 18:47:03 -0700
commit42dbac60f15e038270d6e0c7285caba8256e86f1 (patch)
tree20e9475cdbac75d325bdab92fea34068d93536f6 /samples/source/XMPFilesCoverage.cpp
parent88af812fde414aca8f9add90bc800ea3d8e9a281 (diff)
Update to XMP SDK 5.1.2
Diffstat (limited to 'samples/source/XMPFilesCoverage.cpp')
-rw-r--r--samples/source/XMPFilesCoverage.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/samples/source/XMPFilesCoverage.cpp b/samples/source/XMPFilesCoverage.cpp
index 84e5e27..759baef 100644
--- a/samples/source/XMPFilesCoverage.cpp
+++ b/samples/source/XMPFilesCoverage.cpp
@@ -1,5 +1,5 @@
// =================================================================================================
-// Copyright 2002-2008 Adobe Systems Incorporated
+// Copyright 2002 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -141,7 +141,7 @@ static void OpenTestFile ( const char * fileName, XMP_OptionBits rwMode, SXMPMet
static const char * charForms[] = { "UTF-8", "unknown char form", "UTF-16BE", "UTF-16LE", "UTF-32BE", "UTF-32LE" };
- XMP_OptionBits smartFlags = rwMode | kXMPFiles_OpenUseSmartHandler | kXMPFiles_OpenCacheTNail;
+ XMP_OptionBits smartFlags = rwMode | kXMPFiles_OpenUseSmartHandler;
XMP_OptionBits scanFlags = rwMode | kXMPFiles_OpenUsePacketScanning;
ok = xmpFile->OpenFile ( fileName, kXMP_UnknownFile, smartFlags );
@@ -156,19 +156,6 @@ static void OpenTestFile ( const char * fileName, XMP_OptionBits rwMode, SXMPMet
fprintf ( sLogFile, "File info : format = \"%.4s\", handler flags = 0x%X, open flags = 0x%X (%s)\n",
&format, handlerFlags, openFlags, (isUpdate ? "update" : "read-only") );
-
- XMP_ThumbnailInfo tnail;
- ok = xmpFile->GetThumbnail ( &tnail );
- if ( ! ok ) {
- fprintf ( sLogFile, "No thumbnail\n" );
- } else {
- fprintf ( sLogFile, "Thumbnail info : file format = \"%.4s\", tnail format = %d, tnail size = %d\n",
- &tnail.fileFormat, tnail.tnailFormat, tnail.tnailSize );
- fprintf ( sLogFile, " Image width x height, orientation : %d x %d, %d\n",
- tnail.fullWidth, tnail.fullHeight, tnail.fullOrientation );
- fprintf ( sLogFile, " TNail width x height, orientation : %d x %d, %d\n",
- tnail.tnailWidth, tnail.tnailHeight, tnail.tnailOrientation );
- }
ok = xmpFile->GetXMP ( xmpMeta, 0, &xmpPacket );
if ( ! ok ) {
@@ -299,7 +286,11 @@ extern "C" int main ( int argc, const char * argv[] )
fprintf ( sLogFile, "## XMPMeta::Initialize failed!\n" );
return -1;
}
- if ( ! SXMPFiles::Initialize() ) {
+ XMP_OptionBits options = 0;
+ #if UNIX_ENV
+ options |= kXMPFiles_ServerMode;
+ #endif
+ if ( ! SXMPFiles::Initialize ( options ) ) {
fprintf ( sLogFile, "## SXMPFiles::Initialize failed!\n" );
return -1;
}