diff options
author | erouault <erouault> | 2017-10-01 17:38:12 +0000 |
---|---|---|
committer | erouault <erouault> | 2017-10-01 17:38:12 +0000 |
commit | 6da991c22a90c06c33a88e5efeda6db836b1e86a (patch) | |
tree | b8142f9407c1133740e9eac9e9b79e18f17ebeff | |
parent | dd64754accb983ead942800e59edd82c5e960f28 (diff) | |
download | libtiff-6da991c22a90c06c33a88e5efeda6db836b1e86a.tar.gz |
* tools/tiffset.c: fix setting a single value for the ExtraSamples tag
(and other tags with variable number of values).
So 'tiffset -s ExtraSamples 1 X'. This only worked
when setting 2 or more values, but not just one.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tools/tiffset.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2017-10-01 Even Rouault <even.rouault at spatialys.com> + + * tools/tiffset.c: fix setting a single value for the ExtraSamples tag + (and other tags with variable number of values). + So 'tiffset -s ExtraSamples 1 X'. This only worked + when setting 2 or more values, but not just one. + 2017-09-29 Even Rouault <even.rouault at spatialys.com> * libtiff/libtiff.def: add TIFFReadRGBAStripExt and TIFFReadRGBATileExt diff --git a/tools/tiffset.c b/tools/tiffset.c index 7044d2ba..894c9f1f 100644 --- a/tools/tiffset.c +++ b/tools/tiffset.c @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: tiffset.c,v 1.18 2012-12-04 03:02:37 bfriesen Exp $ + * $Id: tiffset.c,v 1.19 2017-10-01 17:38:12 erouault Exp $ * * Project: libtiff tools * Purpose: Mainline for setting metadata in existing TIFF files. @@ -155,7 +155,7 @@ main(int argc, char* argv[]) return 4; } - if (wc > 1) { + if (wc > 1 || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) { int i, size; void *array; |