Skip navigation
alexhuang999
Currently Being Moderated

ISOSpeedRatings is an array item now?

Mar 27, 2012 8:14 PM

In XMP SDK 5.2.

 

in function PhotoDataUtils::ExportExif

 

it asks ISOSpeedRatings to be an array item, but it is not. Any special consideration to make it this way? Thanks.

 

 

 

 

haveXMP = xmp->DoesPropertyExist ( kXMP_NS_EXIF, "ISOSpeedRatings" );

if ( haveXMP ) {

XMP_Index i, count;

std::string isoValue;

bool haveHighISO = false;

for ( i = 1, count = xmp->CountArrayItems ( kXMP_NS_EXIF, "ISOSpeedRatings" ); i <= count; ++i ) {

xmp->GetArrayItem ( kXMP_NS_EXIF, "ISOSpeedRatings", i, &isoValue, 0 );

if ( SXMPUtils::ConvertToInt ( isoValue.c_str() ) > 0xFFFF ) { haveHighISO = true; break; }

}

 

if ( ! haveHighISO ) {

haveExif = exif->GetTag ( kTIFF_ExifIFD, kTIFF_ISOSpeedRatings, 0 );

if ( ! haveExif ) { // ISOSpeedRatings has an inject-only mapping.

ExportArrayTIFF ( exif, kTIFF_ExifIFD, kISOSpeedMapping, exif->IsNativeEndian(), *xmp, kXMP_NS_EXIF, "ISOSpeedRatings" );

}

xmp->DeleteProperty ( kXMP_NS_EXIF, "ISOSpeedRatings");

}

 

}

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points