diff options
author | Even Rouault <even.rouault@spatialys.com> | 2017-10-01 17:38:12 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2017-10-01 17:38:12 +0000 |
commit | 76a2b9d619a78996529e53e08dbe5e56fac497ff (patch) | |
tree | 8efd47f7ce2d42486d9e92697e37e6175c05c18e | |
parent | 28bf544f331798e0cd89901a4473067aee887105 (diff) | |
download | libtiff-git-76a2b9d619a78996529e53e08dbe5e56fac497ff.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; |