diff options
author | Andrey Kiselev <dron@ak4719.spb.edu> | 2005-12-09 14:52:48 +0000 |
---|---|---|
committer | Andrey Kiselev <dron@ak4719.spb.edu> | 2005-12-09 14:52:48 +0000 |
commit | 796777f5c5d2c1de4fbec6f11e3d2bca61636ed4 (patch) | |
tree | 9c1261586acaf8975bf27f1dcde390ad3c162f8f | |
parent | b6862f841419bf01fe6ff7dba6374a06d3f3532f (diff) | |
download | libtiff-git-796777f5c5d2c1de4fbec6f11e3d2bca61636ed4.tar.gz |
Print EXIF directory contents if exist.
-rw-r--r-- | tools/tiffinfo.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c index b1f50fd7..d4c04b6c 100644 --- a/tools/tiffinfo.c +++ b/tools/tiffinfo.c @@ -1,4 +1,4 @@ -/* $Id: tiffinfo.c,v 1.7 2004-09-03 08:19:27 dron Exp $ */ +/* $Id: tiffinfo.c,v 1.8 2005-12-09 14:52:48 dron Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -129,9 +129,16 @@ main(int argc, char* argv[]) if (TIFFSetSubDirectory(tif, diroff)) tiffinfo(tif, order, flags); } else { - do + do { + uint32 offset; + tiffinfo(tif, order, flags); - while (TIFFReadDirectory(tif)); + if (TIFFGetField(tif, TIFFTAG_EXIFIFD, + &offset)) { + if (TIFFReadEXIFDirectory(tif, offset)) + tiffinfo(tif, order, flags); + } + } while (TIFFReadDirectory(tif)); } TIFFClose(tif); } |