Exemplo n.º 1
0
bool ShowTag(CIccProfile *pIcc, icTagSignature sig)
{
  CIccTag *pTag = pIcc->FindTag(sig);
  icChar buf[64];
  CIccInfo Fmt;

  std::string contents;

  if (!pTag)
    return false;

  printf("\n************ Tag Contents **************\n");

  printf("\nContents of %s tag (%s)\n", Fmt.GetTagSigName(sig), icGetSig(buf, sig)); 
  printf("Type:   ");
  if (pTag->IsArrayType()) {
    printf("Array of ");
  }
  printf("%s\n", Fmt.GetTagTypeSigName(pTag->GetType()));
  pTag->Describe(contents);
  fwrite(contents.c_str(), contents.length(), 1, stdout);

  printf("\n****************************************\n");

  return true;
}
Exemplo n.º 2
0
void DumpTag(CIccProfile *pIcc, icTagSignature sig)
{
  CIccTag *pTag = pIcc->FindTag(sig);
  char buf[64];
  CIccInfo Fmt;

  std::string contents;

  if (pTag) {
    printf("\nContents of %s tag (%s)\n", Fmt.GetTagSigName(sig), icGetSig(buf, sig)); 
    printf("Type:   ");
    if (pTag->IsArrayType()) {
      printf("Array of ");
    }
    printf("%s\n", Fmt.GetTagTypeSigName(pTag->GetType()));
    pTag->Describe(contents);
    fwrite(contents.c_str(), contents.length(), 1, stdout);
  }
  else {
    printf("Tag (%s) not found in profile\n", icGetSig(buf, sig));
  }
}