diff options
author | Frank Warmerdam <warmerdam@pobox.com> | 2004-10-01 02:30:29 +0000 |
---|---|---|
committer | Frank Warmerdam <warmerdam@pobox.com> | 2004-10-01 02:30:29 +0000 |
commit | 830509e8704f77574ce7f9456c08b12fd4180575 (patch) | |
tree | 241012d7243d33f7777a95810e7f10f2ce639551 | |
parent | 79137201c45a7aec0d9cb758bbbf2cc6202ad74c (diff) | |
download | libtiff-git-830509e8704f77574ce7f9456c08b12fd4180575.tar.gz |
Changed type of XMLPacket to BYTE instead of UNDEFINED to match Adobe XMP
specification. Added custom printer for XMLPacket data to tif_print.c.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libtiff/tif_dirinfo.c | 4 | ||||
-rw-r--r-- | libtiff/tif_print.c | 9 |
3 files changed, 16 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2004-09-30 Frank Warmerdam <warmerdam@pobox.com> + + * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to + TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info + in the Adobe XMP Specification. + 2004-09-29 Andrey Kiselev <dron@remotesensing.org> * libtiff/{tif_jpeg.c, tif_pixarlog.c}: Use _TIFFmemset() instead of diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c index c3e1a751..7ab35842 100644 --- a/libtiff/tif_dirinfo.c +++ b/libtiff/tif_dirinfo.c @@ -1,4 +1,4 @@ -/* $Id: tif_dirinfo.c,v 1.30 2004-09-25 19:36:57 dron Exp $ */ +/* $Id: tif_dirinfo.c,v 1.31 2004-10-01 02:30:29 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -208,7 +208,7 @@ const TIFFFieldInfo tiffFieldInfo[] = { /* XXX temporarily accept LONG for backwards compatibility */ { TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG, FIELD_REFBLACKWHITE, TRUE, FALSE, "ReferenceBlackWhite" }, - { TIFFTAG_XMLPACKET, -1,-3, TIFF_UNDEFINED, FIELD_XMLPACKET, + { TIFFTAG_XMLPACKET, -1,-3, TIFF_BYTE, FIELD_XMLPACKET, FALSE, TRUE, "XMLPacket" }, /* begin SGI tags */ { TIFFTAG_MATTEING, 1, 1, TIFF_SHORT, FIELD_EXTRASAMPLES, diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c index 904f94e5..d86dee3c 100644 --- a/libtiff/tif_print.c +++ b/libtiff/tif_print.c @@ -1,4 +1,4 @@ -/* $Id: tif_print.c,v 1.17 2004-09-21 10:18:22 dron Exp $ */ +/* $Id: tif_print.c,v 1.18 2004-10-01 02:30:29 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -478,6 +478,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) fprintf(fd, " %5lu", (long) td->td_subifd[i]); fputc('\n', fd); } + if (TIFFFieldSet(tif,FIELD_XMLPACKET)) { + fprintf(fd, " XMLPacket (XMP Metadata):\n" ); + for( i=0; i < td->td_xmlpacketLength; i++ ) + fputc( ((char *)td->td_xmlpacketData)[i], fd ); + fprintf( fd, "\n" ); + } + /* ** Custom tag support. */ |