diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-30 20:15:43 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-30 20:15:43 +0000 |
commit | 708ab2d6edbe32636cf307a6210cd3881e1575ef (patch) | |
tree | cbab734201723ff8d4e4cf02fc0b80dc2087134f /converter | |
parent | 0650b25ed6a0123e58c76616fef606fd3f8ad799 (diff) | |
download | netpbm-mirror-708ab2d6edbe32636cf307a6210cd3881e1575ef.tar.gz netpbm-mirror-708ab2d6edbe32636cf307a6210cd3881e1575ef.tar.xz netpbm-mirror-708ab2d6edbe32636cf307a6210cd3881e1575ef.zip |
Release 10.47.50
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@2197 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/exif.c | 23 | ||||
-rw-r--r-- | converter/other/exif.h | 3 |
2 files changed, 20 insertions, 6 deletions
diff --git a/converter/other/exif.c b/converter/other/exif.c index 19f108a7..f9592d6c 100644 --- a/converter/other/exif.c +++ b/converter/other/exif.c @@ -86,6 +86,9 @@ static int 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 @@ -472,15 +475,25 @@ ProcessExifDir(unsigned char * const ExifData, switch(Tag){ case TAG_MAKE: - strncpy(ImageInfoP->CameraMake, (char*)ValuePtr, 31); + STRSCPY(ImageInfoP->CameraMake, (char*)ValuePtr); break; case TAG_MODEL: - strncpy(ImageInfoP->CameraModel, (char*)ValuePtr, 39); + STRSCPY(ImageInfoP->CameraModel, (char*)ValuePtr); break; + case TAG_XRESOLUTION: + ImageInfoP->XResolution = + ConvertAnyFormat(ValuePtr, Format); + break; + + case TAG_YRESOLUTION: + ImageInfoP->YResolution = + ConvertAnyFormat(ValuePtr, Format); + break; + case TAG_DATETIME_ORIGINAL: - strncpy(ImageInfoP->DateTime, (char*)ValuePtr, 19); + STRSCPY(ImageInfoP->DateTime, (char*)ValuePtr); ImageInfoP->DatePointer = (char*)ValuePtr; break; @@ -838,8 +851,8 @@ ShowImageInfo(ImageInfo_t * const ImageInfoP) if (ImageInfoP->DateTime[0]){ fprintf(stderr, "Date/Time : %s\n",ImageInfoP->DateTime); } - fprintf(stderr, "Resolution : %d x %d\n", - ImageInfoP->Width, ImageInfoP->Height); + fprintf(stderr, "Resolution : %f x %f\n", + ImageInfoP->XResolution, ImageInfoP->YResolution); if (ImageInfoP->Orientation > 1){ /* Only print orientation if one was supplied, and if its not diff --git a/converter/other/exif.h b/converter/other/exif.h index e5825e12..4630988f 100644 --- a/converter/other/exif.h +++ b/converter/other/exif.h @@ -16,7 +16,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; |