Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate216.isp.belgacom.be ([195.238.22.48])
          by mailfep024.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20210827001124.OFPF11498.mailfep024.skynet.be@mailgate216.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Fri, 27 Aug 2021 02:11:24 +0200
Authentication-Results: mx201.skynet.be; dkim=none (message not signed) header.i=none; spf=None smtp.pra=tiff-bounces@lists.osgeo.org; spf=Pass smtp.mailfrom=tiff-bounces@lists.osgeo.org; spf=Pass smtp.helo=postmaster@lists.osgeo.org
Received-SPF: None (mx201.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx201.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx201.skynet.be: domain of
  tiff-bounces@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=mailfrom; client-ip=140.211.15.3;
  receiver=mx201.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
Received-SPF: Pass (mx201.skynet.be: domain of
  postmaster@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=helo; client-ip=140.211.15.3;
  receiver=mx201.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="postmaster@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
X-Ironport-Dmarc-Check-Result: validskip
IronPort-SDR: han8m7JxiCyGgglO8wb+GV9ScTGAn1DCyKuUpkNw40ALfzMihrghT/JMPgpF/AHWPPUDqxYiLq
 LoKQzKdZG5CFB/HtekZmJig67n6cp1V+WbYDSzZ7rNVuygCa/ND7oB9F4oUf6MMtuAKh/xOcjf
 h/kHu+aWXHC1qyOAKqsojImpWIFpjcVxTmW0u5oWvRA1k2HR4VEO4xk5kFzrxDGFMdwhB5yy37
 SxdaxOBIBgwu+SV5yo9vJru0DHm0YcT124ZzOYQn3W5UTDF+F+KxawKVz147xLc5G8SSWVCNgM
 PZQd6/ka+JZG1dkNwhY4RoTu
X-Proximus-RemoteIp: 140.211.15.3
X-Proximus-Mfrom: tiff-bounces@lists.osgeo.org
X-Proximus-Rcpto: chris.lindelaan@skynet.be
X-IPAS-Result: =?us-ascii?q?A0F3AgCWLChhhwMP04xXA4EJgVmBI4EBGQFkVwEnAwc5h?=
 =?us-ascii?q?EiDS4U5iAYDiCWCO5EVIIEgMxQBAQIBAQEBAQkqAQ4IBAEBAQIBAyQBgUuFK?=
 =?us-ascii?q?R8GAQQwCQ4BAgQBAQEBAwIDAQEBAQUBAQEEAQEBAgEBAgMCAgEBAhABAQEBg?=
 =?us-ascii?q?SAGXgZkBGYGXwRigRINMg2CNQUCAx8BBgtjUzQBAQEBAQEBAQEBAQEBAQEBA?=
 =?us-ascii?q?QEBAQEBAQESAggFTQVHAR4BAQEBAgEBAQEPEQQfCgUZCwMCAQECBgEBCAILD?=
 =?us-ascii?q?SIEBAICAwEdAQUBDAEFARwGEwUdgk8BglUDDiEFCo5pjxeBBD2KOHgCfzKBA?=
 =?us-ascii?q?YMUOQGBBoJNDYJIEoEohXNTSAEBhmo6CYINelGCcz6CICsXAQECAYIkglCCZ?=
 =?us-ascii?q?ASGOiZvFBcBBQ9HAnCBKpEzCA6OAA5RgSaJWZFBXoxfgRWMSIFrhWcsg2WBS?=
 =?us-ascii?q?JBikG2iWYM5kCaFIBAjgT45gVwfXgg7MQZ8GoEcCUQBAgECDQ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b7LbWSS7/yKhDVQSOxQu+VvmZrA7Yy1okuFDzsaCJ2IiT0JejpzPXcGMDWubqBJcq
 Z0iPA3wAZJuBwsH72G77o+MNQrZeemqHsrW3A775FO0nj3sdpg0t/HLyQ=
X-IronPort-Anti-Spam-Filtered: true
X-MGA-submission: =?us-ascii?q?MDHS+1FhhuD6y+dY85Q5acmKDdAZr/vNoMZFFO?=
 =?us-ascii?q?Nmdugoc3G++uFhY+bLfNhVpvDg1PBSqbFS1TcwHNcvhTaQiOzz75mGfX?=
 =?us-ascii?q?Wvx+y5IzSo+adSaev18YaBvK+dPeR3fPt5KQQ=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx201.skynet.be with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2021 02:11:22 +0200
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 67D786138C9F;
	Thu, 26 Aug 2021 17:11:17 -0700 (PDT)
Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com
 [209.85.208.177])
 by lists.osgeo.org (Postfix) with ESMTPS id CF9DD6146814
 for <tiff@lists.osgeo.org>; Thu, 26 Aug 2021 17:11:15 -0700 (PDT)
Received: by mail-lj1-f177.google.com with SMTP id i28so8275269ljm.7
 for <tiff@lists.osgeo.org>; Thu, 26 Aug 2021 17:11:15 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=aad43zjC4kAuPnOdJ6F62CcSVS+pdVOiawEX0KhiaRo=;
 b=qblfva4LuSPLzqPyiriuMbUT4A539gUC95+a1igjMMtwLsplCj/idBhNzNOte/i2RP
 uCM8Ab0YdBbr++59t5Eo8nrlNbCTyrs4E163TX9jvvNHufEDXWxnQyVQjhi63gPdmv1t
 4/AZsyqxVIhyXHDbUge/AhYCQhSphZoVKVTinee5yJqLAiH/ll3xaosBOJ5aPPLstGv+
 m3HOKX1OgMdEaRv/0nxz24JhA0cSn1h2Uuy9zvaB8/j3cAMrw0W4v8sOC/VXDG02/kBZ
 yRhZRltBsQ/25PU76ufn4q1qf9JvcM5X4UgWuZHV8kUmnhJz7g+QJKbGr3NAknOWj5+L
 sdog==
X-Gm-Message-State: AOAM530yFp5tVwSeYVxfL9n9txMDrV3aRdtF2rCzeyWo4wi48b6AT8eb
 awwW1aK2J5/DFOmZXQzm0gLGANxKG1qhM/aSXzWWRQ==
X-Google-Smtp-Source: ABdhPJyhZYo2BJXFZpgB84+yzjUuna2l9+n1MVXlF0989kR0y1uoCEDGQsOKhhiz8vPH32y2caxCLy0m1z3ILlNjE0A=
X-Received: by 2002:a2e:b001:: with SMTP id y1mr5464392ljk.360.1630023074043; 
 Thu, 26 Aug 2021 17:11:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAJf0+Ahq4+zuRaZwGOjVxWhWwdG9xhbD_HZvXDaEX=f6Yc-Few@mail.gmail.com>
 <600305dd-5835-dea0-de70-9e1a35b2af65@spatialys.com>
 <CANoujwHo=7N=+7Yh9nSPfxNvk9MD2B9+R3R48iAs2Jv1o1R+Jg@mail.gmail.com>
 <CAJf0+Aie_sfd124bmHSXhBFuNZ0yD42W16avp6Cfw8RQkPxNtg@mail.gmail.com>
 <e0ece56f-0284-1c66-6c52-2416d2396558@spatialys.com>
 <CAJf0+AiAmhA0Afu6bN86NOqhuTJErWy4ocLagBGxMoFTea=rnA@mail.gmail.com>
In-Reply-To: <CAJf0+AiAmhA0Afu6bN86NOqhuTJErWy4ocLagBGxMoFTea=rnA@mail.gmail.com>
Date: Thu, 26 Aug 2021 17:11:03 -0700
Message-ID: <CAJf0+Ajf94f61Q_k3r=RcVAJYS2puRh7ifXmsz9cLfDtJKaoPQ@mail.gmail.com>
To: Even Rouault <even.rouault@spatialys.com>
Subject: Re: [Tiff] Setting/Getting Custom Metadata
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.34
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>
From: Reynaldo FariasZorrilla via Tiff <tiff@lists.osgeo.org>
Reply-To: Reynaldo FariasZorrilla <reynaldo.fariaszorr@10xgenomics.com>
Cc: tiff@lists.osgeo.org
Content-Type: multipart/mixed; boundary="===============5922129295701927341=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

--===============5922129295701927341==
Content-Type: multipart/alternative; boundary="0000000000004df01605ca7f52fe"

--0000000000004df01605ca7f52fe
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

where this->tiffFile and tagID are confirmed to be non-null values

On Thu, Aug 26, 2021 at 5:09 PM Reynaldo FariasZorrilla <
reynaldo.fariaszorr@10xgenomics.com> wrote:

> Thanks!
>
> Unfortunately, now I get a seg fault when trying to read one of the ASCII
> tags. I read it as follows:
> char* dataChar =3D nullptr;
> TIFFGetField(this->tiffFile, tagID,  &dataChar);
>
> std::cout << "Char type: " << dataChar << std::endl; //seg fault here
>
> I assume the dataChar pointer is still a nullpointer in the print,
> suggesting the get field just didnt do anything. Any ideas as to why that
> would be the case?
>
> On Thu, Aug 26, 2021 at 4:45 PM Even Rouault <even.rouault@spatialys.com>
> wrote:
>
>>
>> Le 27/08/2021 =C3=A0 01:42, Reynaldo FariasZorrilla a =C3=A9crit :
>>
>> Thanks for the replies!
>>
>> I've been trying to replicate the process in the geotiff file, but the
>> "TRUE" and "FALSE" constants don't seem to be defined for me. Do you def=
ine
>> them somewhere Even?
>>
>> Ah they are just application specific #define. TRUE =3D 1, FALSE =3D 0
>>
>>
>> I'll look into uuencoding, thanks Rob.
>>
>> On Thu, Aug 26, 2021 at 11:08 AM Rob Tillaart <rob.tillaart@gmail.com>
>> wrote:
>>
>>>
>>> thinking out loud, a binary tag could be uuencoded and handled as ASCII
>>> as Even Rouault states.
>>> And uudecoded when extracting it.
>>> my 2 cents
>>>
>>> On Thu, Aug 26, 2021 at 8:02 PM Even Rouault <even.rouault@spatialys.co=
m>
>>> wrote:
>>>
>>>> Reynaldo,
>>>>
>>>> I've some vague recollection of having looked for what would be the
>>>> "new" interface and failed in doing so (my impression was that such a =
new
>>>> interface was never completed). In the software I maintain, I use
>>>> TIFFMergeFieldInfo and that works fine for ASCII tags. See
>>>> https://github.com/OSGeo/gdal/blob/028757368b9064575b133b2bd9e6a928b69=
915cb/gdal/frmts/gtiff/geotiff.cpp#L19779
>>>>
>>>> Even
>>>> Le 26/08/2021 =C3=A0 19:40, Reynaldo FariasZorrilla via Tiff a =C3=A9c=
rit :
>>>>
>>>> Hello!
>>>>
>>>> How does one set and get custom metadata using libtiff? I've searched
>>>> the internet for a while, but the resources are scarce. I've managed t=
o set
>>>> and get non-ASCII tags using the obsolete custom tag interface
>>>> (TIFFMergeFieldInfo and the such), but I've had trouble getting the ne=
w
>>>> interface to work (not sure what the new interface actually *is*), and
>>>> I've had no luck with ASCII values in the old interface.
>>>>
>>>> Any help is appreciated.
>>>> Thanks,
>>>> Reynaldo
>>>>
>>>> --
>>>> Reynaldo Farias Zorrilla
>>>> Software Engineer, Embedded
>>>> reynaldo.fariaszorr@10xgenomics.com
>>>> [image: 10x Genomics] <http://www.10xgenomics.com/>
>>>> Mobile 925 977 5404
>>>> 6230 Stoneridge Mall Road
>>>> Pleasanton, CA 94588-3260  |  10xgenomics.com
>>>> <http://www.10xgenomics.com/>
>>>>
>>>> _______________________________________________
>>>> Tiff mailing listTiff@lists.osgeo.orghttps://lists.osgeo.org/mailman/l=
istinfo/tiff
>>>>
>>>> -- http://www.spatialys.com
>>>> My software is free, but my time generally not.
>>>>
>>>> _______________________________________________
>>>> Tiff mailing list
>>>> Tiff@lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/tiff
>>>>
>>> -- http://www.spatialys.com
>> My software is free, but my time generally not.
>>
>>

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

<div dir=3D"ltr">where <font face=3D"monospace">this-&gt;tiffFile</font> an=
d <font face=3D"monospace">tagID </font>are confirmed to be non-null values=
</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">=
On Thu, Aug 26, 2021 at 5:09 PM Reynaldo FariasZorrilla &lt;<a href=3D"mail=
to:reynaldo.fariaszorr@10xgenomics.com">reynaldo.fariaszorr@10xgenomics.com=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr">Thanks!<div><br></div><div>Unfortunately, now I get a seg =
fault when trying to read one of the ASCII tags. I read it as follows:</div=
><div><font face=3D"monospace">char* dataChar =3D nullptr;=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<br>TIFFGetField(thi=
s-&gt;tiffFile, tagID, =C2=A0&amp;dataChar);=C2=A0=C2=A0<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <br>std::cout &lt;&=
lt; &quot;Char type: &quot; &lt;&lt; dataChar &lt;&lt; std::endl; //seg fau=
lt here</font><br></div><div><br></div><div>I assume the dataChar pointer i=
s still a nullpointer=C2=A0in the print, suggesting the get field just didn=
t=C2=A0do anything. Any ideas as to why that would be the case?</div></div>=
<br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu=
, Aug 26, 2021 at 4:45 PM Even Rouault &lt;<a href=3D"mailto:even.rouault@s=
patialys.com" target=3D"_blank">even.rouault@spatialys.com</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 =20
   =20
 =20
  <div>
    <p><br>
    </p>
    <div>Le 27/08/2021 =C3=A0 01:42, Reynaldo
      FariasZorrilla a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">Thanks for the replies!
        <div><br>
        </div>
        <div>I&#39;ve been trying to replicate the process in the geotiff
          file, but the &quot;TRUE&quot; and &quot;FALSE&quot; constants do=
n&#39;t seem to be
          defined for me. Do you define them somewhere Even?</div>
      </div>
    </blockquote>
    Ah they are just application specific #define. TRUE =3D 1, FALSE =3D 0<=
br>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div><br>
        </div>
        <div>I&#39;ll look into uuencoding, thanks Rob.</div>
      </div>
      <br>
      <div class=3D"gmail_quote">
        <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 26, 2021 at 11:08
          AM Rob Tillaart &lt;<a href=3D"mailto:rob.tillaart@gmail.com" tar=
get=3D"_blank">rob.tillaart@gmail.com</a>&gt; wrote:<br>
        </div>
        <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir=3D"ltr"><br>
            <div>thinking out loud, a binary tag could be uuencoded and
              handled as ASCII as Even Rouault states.=C2=A0<br>
              And uudecoded when extracting it.=C2=A0<br>
              my 2 cents</div>
          </div>
          <br>
          <div class=3D"gmail_quote">
            <div dir=3D"ltr" class=3D"gmail_attr">On Thu, Aug 26, 2021 at
              8:02 PM Even Rouault &lt;<a href=3D"mailto:even.rouault@spati=
alys.com" target=3D"_blank">even.rouault@spatialys.com</a>&gt;
              wrote:<br>
            </div>
            <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div>
                <p>Reynaldo,</p>
                <p>I&#39;ve some vague recollection of having looked for
                  what would be the &quot;new&quot; interface and failed in=
 doing
                  so (my impression was that such a new interface was
                  never completed). In the software I maintain, I use
                  TIFFMergeFieldInfo and that works fine for ASCII tags.
                  See
                  <a href=3D"https://github.com/OSGeo/gdal/blob/028757368b9=
064575b133b2bd9e6a928b69915cb/gdal/frmts/gtiff/geotiff.cpp#L19779" target=
=3D"_blank">https://github.com/OSGeo/gdal/blob/028757368b9064575b133b2bd9e6=
a928b69915cb/gdal/frmts/gtiff/geotiff.cpp#L19779</a></p>
                <p>Even<br>
                </p>
                <div>Le 26/08/2021 =C3=A0 19:40, Reynaldo FariasZorrilla vi=
a
                  Tiff a =C3=A9crit=C2=A0:<br>
                </div>
                <blockquote type=3D"cite">
                  <div dir=3D"ltr">Hello!
                    <div><br>
                    </div>
                    <div>How does one set and get custom metadata using
                      libtiff? I&#39;ve searched the internet for a while,
                      but the resources are scarce. I&#39;ve managed to set
                      and get non-ASCII tags using=C2=A0the obsolete custom
                      tag interface (TIFFMergeFieldInfo and the such),
                      but I&#39;ve had trouble getting the new interface to
                      work (not sure what the new interface actually <i>is<=
/i>),
                      and I&#39;ve had no luck with ASCII values in the old
                      interface.=C2=A0</div>
                    <div><br>
                    </div>
                    <div>Any help is appreciated.=C2=A0</div>
                    <div>Thanks,</div>
                    <div>Reynaldo<br clear=3D"all">
                      <div><br>
                      </div>
                      -- <br>
                      <div dir=3D"ltr">
                        <div dir=3D"ltr">
                          <table cellspacing=3D"0" cellpadding=3D"0" border=
=3D"0">
                            <tbody>
                              <tr>
                                <td style=3D"padding:0px" valign=3D"top"><s=
pan style=3D"color:rgb(0,161,223);font-family:Arial,sans-serif;font-size:14=
pt">Reynaldo
                                    Farias Zorrilla</span><br>
                                  <span style=3D"margin-top:0px;margin-bott=
om:0px;color:rgb(82,90,96);font-family:Arial,sans-serif;font-size:10pt;line=
-height:14pt">Software
                                    Engineer, Embedded<br>
                                    <a href=3D"mailto:reynaldo.fariaszorr@1=
0xgenomics.com" style=3D"color:rgb(82,90,96)" target=3D"_blank">reynaldo.fa=
riaszorr@10xgenomics.com</a></span><br>
                                </td>
                              </tr>
                              <tr>
                                <td style=3D"padding:20px 0px 8px" valign=
=3D"top"><a href=3D"http://www.10xgenomics.com/" style=3D"color:rgb(82,90,9=
6)" target=3D"_blank"><img alt=3D"10x
                                      Genomics" title=3D"10x Genomics" widt=
h=3D"65" height=3D"45" border=3D"0"></a></td>
                              </tr>
                              <tr>
                                <td style=3D"padding:4px 0px 0px" valign=3D=
"top"><span style=3D"color:rgb(82,90,96);font-family:Arial;font-size:10pt;l=
ine-height:14pt">Mobile
                                    925 977 5404<br>
                                    6230 Stoneridge Mall Road<br>
                                    Pleasanton, CA 94588-3260 =C2=A0|=C2=A0=
=C2=A0<a href=3D"http://www.10xgenomics.com/" style=3D"color:rgb(0,161,223)=
;font-weight:600" target=3D"_blank">10xgenomics.com</a></span></td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                      </div>
                    </div>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <pre>_______________________________________________
Tiff mailing list
<a href=3D"mailto:Tiff@lists.osgeo.org" target=3D"_blank">Tiff@lists.osgeo.=
org</a>
<a href=3D"https://lists.osgeo.org/mailman/listinfo/tiff" target=3D"_blank"=
>https://lists.osgeo.org/mailman/listinfo/tiff</a>
</pre>
                </blockquote>
                <pre cols=3D"72">--=20
<a href=3D"http://www.spatialys.com" target=3D"_blank">http://www.spatialys=
.com</a>
My software is free, but my time generally not.</pre>
              </div>
              _______________________________________________<br>
              Tiff mailing list<br>
              <a href=3D"mailto:Tiff@lists.osgeo.org" target=3D"_blank">Tif=
f@lists.osgeo.org</a><br>
              <a href=3D"https://lists.osgeo.org/mailman/listinfo/tiff" rel=
=3D"noreferrer" target=3D"_blank">https://lists.osgeo.org/mailman/listinfo/=
tiff</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre cols=3D"72">--=20
<a href=3D"http://www.spatialys.com" target=3D"_blank">http://www.spatialys=
.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>
</blockquote></div>

--0000000000004df01605ca7f52fe--

--===============5922129295701927341==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff

--===============5922129295701927341==--
