diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-24 14:25:49 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-04-24 14:25:49 +0000 |
commit | 15a1a702e2fc9e590820a377d766a8c23ed0dc2b (patch) | |
tree | c2b315be0f58bb9ce438eafec943b4f2c6085307 /converter/other/exif.c | |
parent | 39ce3b6a639cff6dbcecfe5be99c2d64049e7a95 (diff) | |
download | netpbm-mirror-15a1a702e2fc9e590820a377d766a8c23ed0dc2b.tar.gz netpbm-mirror-15a1a702e2fc9e590820a377d766a8c23ed0dc2b.tar.xz netpbm-mirror-15a1a702e2fc9e590820a377d766a8c23ed0dc2b.zip |
Release 10.66.02
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@2191 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/exif.c')
-rw-r--r-- | converter/other/exif.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/converter/other/exif.c b/converter/other/exif.c index b94c1ef4..87d89bd7 100644 --- a/converter/other/exif.c +++ b/converter/other/exif.c @@ -87,6 +87,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 @@ -473,15 +476,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; @@ -839,8 +852,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 |