diff options
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/exif.c | 17 | ||||
-rw-r--r-- | converter/other/exif.h | 3 |
2 files changed, 17 insertions, 3 deletions
diff --git a/converter/other/exif.c b/converter/other/exif.c index 5dd21b32..f4caf92b 100644 --- a/converter/other/exif.c +++ b/converter/other/exif.c @@ -86,6 +86,9 @@ static int const bytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8}; #define TAG_ORIENTATION 0x0112 +#define TAG_XRESOLUTION 0x011A +#define TAG_YRESOLUTION 0x011B + #define TAG_EXPOSURETIME 0x829A #define TAG_FNUMBER 0x829D @@ -502,6 +505,16 @@ processDirEntry(const unsigned char * const dirEntry, strncpy(imageInfoP->CameraModel, (const char*)valuePtr, 39); break; + case TAG_XRESOLUTION: + imageInfoP->XResolution = + convertAnyFormat(valuePtr, format, byteOrder); + break; + + case TAG_YRESOLUTION: + imageInfoP->YResolution = + convertAnyFormat(valuePtr, format, byteOrder); + break; + case TAG_DATETIME_ORIGINAL: strncpy(imageInfoP->DateTime, (const char*)valuePtr, 19); imageInfoP->DatePointer = (const char*)valuePtr; @@ -927,8 +940,8 @@ exif_showImageInfo(const exif_ImageInfo * const imageInfoP, if (imageInfoP->DateTime[0]) fprintf(fileP, "Date/Time : %s\n", imageInfoP->DateTime); - fprintf(fileP, "Resolution : %d x %d\n", - imageInfoP->Width, imageInfoP->Height); + fprintf(fileP, "Resolution : %f x %f\n", + imageInfoP->XResolution, imageInfoP->YResolution); if (imageInfoP->Orientation > 1) { diff --git a/converter/other/exif.h b/converter/other/exif.h index 3882f822..57eb745b 100644 --- a/converter/other/exif.h +++ b/converter/other/exif.h @@ -19,7 +19,8 @@ typedef struct { char CameraMake [32]; char CameraModel [40]; char DateTime [20]; - int Height, Width; + float XResolution; + float YResolution; int Orientation; int IsColor; int FlashUsed; |