Return-Path: <tiff-bounces@lists.osgeo.org>
Delivered-To: even.rouault@spatialys.com
Received: from spool.mail.gandi.net (spool3.mail.gandi.net [217.70.178.212])
	by nmboxes134.sd4.0x35.net (Postfix) with ESMTP id 86D1561859
	for <even.rouault@spatialys.com>; Tue, 22 Jan 2019 15:14:19 +0000 (UTC)
Received: from lists.osgeo.org (osgeo6.osgeo.osuosl.org [140.211.15.3])
	by spool.mail.gandi.net (Postfix) with ESMTPS id 1A1C7AC1365
	for <even.rouault@spatialys.com>; Tue, 22 Jan 2019 15:14:19 +0000 (UTC)
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 8C78760C7B4F;
	Tue, 22 Jan 2019 07:14:16 -0800 (PST)
Received: from mail-it1-f173.google.com (mail-it1-f173.google.com
 [209.85.166.173])
 by lists.osgeo.org (Postfix) with ESMTPS id 4CF8160C7B4F
 for <tiff@lists.osgeo.org>; Tue, 22 Jan 2019 07:14:15 -0800 (PST)
Received: by mail-it1-f173.google.com with SMTP id p197so20505404itp.0
 for <tiff@lists.osgeo.org>; Tue, 22 Jan 2019 07:14:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=oRrK/7WDwKomeiFeBUivL+lbkJKf2Wg44Ov3iyN9BZo=;
 b=jsn3zJ6cT/1pUz+vd7Ss76Qx4dpjhQxDQU6lKqSva9A/ttm0WMOnrj/K7Wb6P5/ABl
 gv/2Tky6p/ICn5/QbCCUqdvsu/S7cxTEhNbk5u39MEzAVDHNiwgUDC5L24kYo2zs56QK
 Gy5PCTSQtIC8bfrl3++rnAPM1V//6OpNBU7fbXvrW87/pP6ygazPxgGhIq1gjLh0erb9
 7sdGT0bLd+z6snpg3ezYH9pUnBDNJtdFjHywJ2mXOMVDutMYUgJVSPR44wbxhBEAMdgA
 3VD/IK1lLqmuu9zw7TkoJ6p5AjSrA0MnDEheiXvMcGrQeg6/znI0n3OtnOA+fEFfjqXW
 Qosg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=oRrK/7WDwKomeiFeBUivL+lbkJKf2Wg44Ov3iyN9BZo=;
 b=MKyLmMengpEYvDjoTy7PL2d+Zqwx6cYevoQMQJXfMwK/QPlH2kH4QG0B+mHdmflCVW
 zhSjzb+ik3zw5MEHXJoX6FM3BNAAk5Dpn/HgWKO5UHQgzoCuk5l01t1sxWFnuHdFeLhW
 eREhIJxYFpyq1pnXtALjKcDETLkbZotWu3jZ7IJv7Mt1nNeKMvanaH5CXp0dwjSKDpRw
 0aPVwK9Cgz16kPqLWNJf9hoHIis9/toUtHJE/wRg+/pcrNOYZSsKwW6Zg2othrMEJ+F9
 cflZ35EIDwNOeFynd9SINbq/3MxTeeuo5vqgJqG2hP1GM0Cirt3VzsnPVPMgEeXqLWBK
 VPhQ==
X-Gm-Message-State: AJcUukc7x/vAlZ284bvsfZFAzkb8eriYEasrNR7UQBWdqpniYp9gO6y+
 FW55trilHWgbkYJEjW356o9MbhzyjmX/5XrLYds5Lq0=
X-Google-Smtp-Source: ALg8bN7y3hOo0jrHfB3is0we1zP/XtUxrNHT9ekaxJjXcq9NqVq4CJFEX47Q49nlcPEo8PKbQZyMs5bEHke+ktxClxo=
X-Received: by 2002:a05:660c:914:: with SMTP id
 s20mr2280002itj.160.1548170054285; 
 Tue, 22 Jan 2019 07:14:14 -0800 (PST)
MIME-Version: 1.0
From: SM <skypemesm@gmail.com>
Date: Tue, 22 Jan 2019 10:14:03 -0500
Message-ID: <CAKSvmhbWrzbfALN21gez-GSh6Qd53euGWqcHxb1r3=wt0ynPuw@mail.gmail.com>
To: tiff@lists.osgeo.org
Content-Type: multipart/mixed; boundary="000000000000237c3705800d6ec7"
Subject: [Tiff] Unable to write inkName - libTiff 4.0.9
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.osgeo.org>
List-Unsubscribe: <https://lists.osgeo.org/mailman/options/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=unsubscribe>
List-Post: <mailto:tiff@lists.osgeo.org>
List-Help: <mailto:tiff-request@lists.osgeo.org?subject=help>
List-Subscribe: <https://lists.osgeo.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=subscribe>
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>
X-GND-Status: LEGIT

--000000000000237c3705800d6ec7
Content-Type: multipart/alternative; boundary="000000000000237c3405800d6ec5"

--000000000000237c3405800d6ec5
Content-Type: text/plain; charset="UTF-8"

Hello,



I am trying a small code snippet, with libTIFF 4.0.9, which is trying to
write the InkNames tag in a separated image but I am hitting the following
error:

TIFFSetField: test.tif: Invalid InkNames value; expecting 4 names, found 3.



I have attached the standalone code to this email. Please note that I have
set the EXTRASAMPLES tag so I believe I can set the rest 3 values that can
be used with SamplesPerPixel.

Can you please confirm if it is a bug?



Also, I noted that the documentation page mentions that "The number of
strings must be equal to NumberOfInks":

https://www.awaresystems.be/imaging/tiff/tifftags/inknames.html



But I found that I can set any value for the tag TIFFTAG_NUMBEROFINKS and
code would still work.



Thanks

Upanita

--000000000000237c3405800d6ec5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;fo=
nt-size:11pt;font-family:Calibri,sans-serif"><br></p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">Hello, </p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">=C2=A0</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">I am trying a small code snippet, with libTIFF =
4.0.9, which
is trying to write the InkNames tag in a separated image but I am hitting t=
he
following error:</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">TIFFSetField: test.tif: Invalid InkNames value;=
 expecting 4
names, found 3.</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">=C2=A0</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">I have attached the standalone code to this ema=
il. Please
note that I have set the EXTRASAMPLES tag so I believe I can set the rest 3
values that can be used with SamplesPerPixel.</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">Can you please confirm if it is a bug?</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">=C2=A0</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">Also, I noted that the documentation page menti=
ons that
&quot;The number of strings must be equal to NumberOfInks&quot;:</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif"><a href=3D"https://www.awaresystems.be/imaging/=
tiff/tifftags/inknames.html" style=3D"color:rgb(5,99,193)">https://www.awar=
esystems.be/imaging/tiff/tifftags/inknames.html</a></p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">=C2=A0</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">But I found that I can set any value for the ta=
g TIFFTAG_NUMBEROFINKS
and code would still work. </p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">=C2=A0</p>

<p class=3D"MsoNormal" style=3D"margin:0in 0in 0.0001pt;font-size:11pt;font=
-family:Calibri,sans-serif">Thanks</p><p class=3D"MsoNormal" style=3D"margi=
n:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">Upanita</=
p></div>

--000000000000237c3405800d6ec5--

--000000000000237c3705800d6ec7
Content-Type: text/plain; charset="US-ASCII"; name="main.c"
Content-Disposition: attachment; filename="main.c"
Content-Transfer-Encoding: base64
Content-ID: <f_jr7wesv20>
X-Attachment-Id: f_jr7wesv20

ICNpbmNsdWRlIDx0aWZmaW8uaD4NCiANCiBpbnQgbWFpbigpDQogew0KIA0KCWNvbnN0IGNoYXIg
Kmlua19uYW1lcyA9ICJSZWRcMEdyZWVuXDBCbHVlXDAiOw0KCWNvbnN0IGludCBpbmtfbmFtZXNf
c2l6ZSA9IDE1Ow0KCXByaW50ZigiRW50ZXJpbmcgbWFpbigpXG4iKTsNCglUSUZGICpvdXQ9VElG
Rk9wZW4oInRlc3QudGlmIiwgInciKTsNCglpbnQgc3RhdHVzOw0KCXN0YXR1cyA9IFRJRkZTZXRG
aWVsZChvdXQsIFRJRkZUQUdfSU1BR0VXSURUSCwgMTApOyAgLy8gc2V0IHRoZSB3aWR0aCBvZiB0
aGUgaW1hZ2UNCglwcmludGYoIlN0YXR1cyA9ICVkXG4iLCBzdGF0dXMpOw0KDQoJc3RhdHVzID0g
VElGRlNldEZpZWxkKG91dCwgVElGRlRBR19JTUFHRUxFTkdUSCwgNyk7ICAgIC8vIHNldCB0aGUg
aGVpZ2h0IG9mIHRoZSBpbWFnZQ0KCXByaW50ZigiU3RhdHVzID0gJWRcbiIsIHN0YXR1cyk7DQoJ
DQoJc3RhdHVzID0gVElGRlNldEZpZWxkKG91dCwgVElGRlRBR19TQU1QTEVTUEVSUElYRUwsIDQp
OyAgIC8vIHNldCBudW1iZXIgb2YgY2hhbm5lbHMgcGVyIHBpeGVsDQoJcHJpbnRmKCJTdGF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GU2V0RmllbGQob3V0LCBUSUZG
VEFHX05VTUJFUk9GSU5LUywgMyk7DQoJc3RhdHVzID0gVElGRlNldEZpZWxkKG91dCwgVElGRlRB
R19JTktOQU1FUywgaW5rX25hbWVzX3NpemUsIGlua19uYW1lcyk7DQoJcHJpbnRmKCJTdGF0dXMg
PSAlZFxuIiwgc3RhdHVzKTsNCgkNCglpZihzdGF0dXM9PTApDQoJew0KCXByaW50ZigiRXJyb3Ii
KTsNCgl9DQoJVElGRkNsb3NlKG91dCk7DQoJCXByaW50ZigiRXhpdGluZyBtYWluKClcbiIpOw0K
DQogfQ0KIA==
--000000000000237c3705800d6ec7
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGlmZiBtYWls
aW5nIGxpc3QKVGlmZkBsaXN0cy5vc2dlby5vcmcKaHR0cHM6Ly9saXN0cy5vc2dlby5vcmcvbWFp
bG1hbi9saXN0aW5mby90aWZmCg==

--000000000000237c3705800d6ec7--

