Commits

Anonymous committed 45b09a2

added new 64-bit metadata types to FREE_IMAGE_MDTYPE (FIDT_LONG8, FIDT_SLONG8, FIDT_IFD8)

  • Participants
  • Parent commits db5f575

Comments (0)

Files changed (1)

Source/Metadata/TagConversion.cpp

 			}
 			break;
 		}
+		
+		case FIDT_LONG8:	// N x 64-bit unsigned integer 
+		{
+			FIUINT64 *pvalue = (FIUINT64 *)FreeImage_GetTagValue(tag);
+
+			sprintf(format, "%ld", pvalue[0]);
+			buffer += format;
+			for(i = 1; i < tag_count; i++) {
+				sprintf(format, "%ld", pvalue[i]);
+				buffer += format;
+			}
+			break;
+		}
+
+		case FIDT_IFD8:		// N x 64-bit unsigned integer (offset)
+		{
+			FIUINT64 *pvalue = (FIUINT64 *)FreeImage_GetTagValue(tag);
+
+			sprintf(format, "%X", pvalue[0]);
+			buffer += format;
+			for(i = 1; i < tag_count; i++) {
+				sprintf(format, "%X", pvalue[i]);
+				buffer += format;
+			}
+			break;
+		}
+
+		case FIDT_SLONG8:	// N x 64-bit signed integer
+		{
+			FIINT64 *pvalue = (FIINT64 *)FreeImage_GetTagValue(tag);
+
+			sprintf(format, "%ld", pvalue[0]);
+			buffer += format;
+			for(i = 1; i < tag_count; i++) {
+				sprintf(format, "%ld", pvalue[i]);
+				buffer += format;
+			}
+			break;
+		}
+
 		case FIDT_ASCII:	// 8-bit bytes w/ last byte null 
 		case FIDT_UNDEFINED:// 8-bit untyped data 
 		default:
 			return buffer.c_str();
 		}
 		break;
-
 	}
 
 	return ConvertAnyTag(tag);