char latitudeRef = 0; // to store latitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
char longitudeRef = 0; // to store longitude reference (quadrasphere designation 'N', 'S', 'W' or 'E')
unsigned int entryCount = 0;
+ bool isOrientation = false;
for (int i = 0; i < EXIF_IFD_COUNT; i++)
{
SysTryReturn(NID_CNT, pMetadata->pDateTime != null, null, E_OUT_OF_MEMORY,
"[E_OUT_OF_MEMORY] The memory is insufficient.");
}
- else if (tag == EXIF_TAG_ORIENTATION)
+ else if (tag == EXIF_TAG_ORIENTATION && !isOrientation)
{
//get the byte order(little endian or big endian) before extracting orientation type
byteOrder = exif_data_get_byte_order(pEntries[j]->parent->parent);
pMetadata->orientation = static_cast<ImageOrientationType>(exif_get_short(pEntries[j]->data, byteOrder));
+
+ isOrientation = true;
}
else if (tag == EXIF_TAG_SOFTWARE)
{