From aba53d12dc539100418f6e303015e9ba98d4426d Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Fri, 2 Mar 2001 04:59:52 +0000 Subject: [PATCH] added copyright tag --- libtiff/tif_dir.c | 9 ++++++++- libtiff/tif_dir.h | 6 ++++-- libtiff/tif_dirinfo.c | 4 +++- libtiff/tif_print.c | 4 +++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c index a565f017..96b0a707 100644 --- a/libtiff/tif_dir.c +++ b/libtiff/tif_dir.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dir.c,v 1.14 2000-10-17 03:23:36 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dir.c,v 1.15 2001-03-02 04:59:52 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -214,6 +214,9 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap) case TIFFTAG_SOFTWARE: _TIFFsetString(&td->td_software, va_arg(ap, char*)); break; + case TIFFTAG_COPYRIGHT: + _TIFFsetString(&td->td_copyright, va_arg(ap, char*)); + break; case TIFFTAG_ORIENTATION: v = va_arg(ap, int); if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) { @@ -641,6 +644,9 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap) case TIFFTAG_SOFTWARE: *va_arg(ap, char**) = td->td_software; break; + case TIFFTAG_COPYRIGHT: + *va_arg(ap, char**) = td->td_copyright; + break; case TIFFTAG_ORIENTATION: *va_arg(ap, uint16*) = td->td_orientation; break; @@ -917,6 +923,7 @@ TIFFFreeDirectory(TIFF* tif) CleanupField(td_make); CleanupField(td_model); CleanupField(td_software); + CleanupField(td_copyright); CleanupField(td_pagename); CleanupField(td_sampleinfo); #if SUBIFD_SUPPORT diff --git a/libtiff/tif_dir.h b/libtiff/tif_dir.h index 7f900a58..cff40839 100644 --- a/libtiff/tif_dir.h +++ b/libtiff/tif_dir.h @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dir.h,v 1.2 1999-12-21 17:03:03 mwelles Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dir.h,v 1.3 2001-03-02 04:59:52 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -70,6 +70,7 @@ typedef struct { char* td_make; char* td_model; char* td_software; + char* td_copyright; char* td_pagename; tstrip_t td_stripsperimage; tstrip_t td_nstrips; /* size of offset & bytecount arrays */ @@ -201,8 +202,9 @@ typedef struct { #define FIELD_FOVCOT 59 #define FIELD_MATRIX_WORLDTOSCREEN 60 #define FIELD_MATRIX_WORLDTOCAMERA 61 +#define FIELD_COPYRIGHT 62 /* end of support for well-known tags; codec-private tags follow */ -#define FIELD_CODEC 62 /* base of codec-private tags */ +#define FIELD_CODEC 63 /* base of codec-private tags */ /* * Pseudo-tags don't normally need field bits since they * are not written to an output file (by definition). diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c index 4f95086f..51cd4482 100644 --- a/libtiff/tif_dirinfo.c +++ b/libtiff/tif_dirinfo.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.3 2001-02-17 03:20:39 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.4 2001-03-02 04:59:52 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -131,6 +131,8 @@ const TIFFFieldInfo tiffFieldInfo[] = { #endif { TIFFTAG_SOFTWARE, -1,-1, TIFF_ASCII, FIELD_SOFTWARE, TRUE, FALSE, "Software" }, + { TIFFTAG_COPYRIGHT, -1,-1, TIFF_ASCII, FIELD_COPYRIGHT, + TRUE, FALSE, "Copyright" }, { TIFFTAG_DATETIME, 20,20, TIFF_ASCII, FIELD_DATETIME, TRUE, FALSE, "DateTime" }, { TIFFTAG_ARTIST, -1,-1, TIFF_ASCII, FIELD_ARTIST, diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c index e2a725a1..0c2a1273 100644 --- a/libtiff/tif_print.c +++ b/libtiff/tif_print.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_print.c,v 1.4 2000-07-14 18:43:08 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_print.c,v 1.5 2001-03-02 04:59:52 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -353,6 +353,8 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) _TIFFprintAsciiTag(fd, "Host Computer", td->td_hostcomputer); if (TIFFFieldSet(tif,FIELD_SOFTWARE)) _TIFFprintAsciiTag(fd, "Software", td->td_software); + if (TIFFFieldSet(tif,FIELD_COPYRIGHT)) + _TIFFprintAsciiTag(fd, "Copyright", td->td_copyright); if (TIFFFieldSet(tif,FIELD_DOCUMENTNAME)) _TIFFprintAsciiTag(fd, "Document Name", td->td_documentname); if (TIFFFieldSet(tif,FIELD_IMAGEDESCRIPTION))