Return-Path: <SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org>
Received: from el10156.bc ([10.35.4.252]) by mailafep004-svc.mx.internal
          (InterMail vM.9.07.03.027 201-2473-138-3) with ESMTP
          id <20230410163040.QMKZ5816.mailafep004-svc.mx.internal@el10156.bc>
          for <chris.lindelaan@skynet.be>; Mon, 10 Apr 2023 18:30:40 +0200
Received: from [40.92.66.77] ([40.92.66.77])
 by el10156.bc with ngmta
 id d20c2b0f-17549fc7ac3ba718; Mon, 10 Apr 2023 18:30:40 +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=SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org; spf=PermError 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="SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx201.skynet.be: domain of
  SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org
  designates 140.211.15.3 as permitted sender)
  identity=mailfrom; client-ip=140.211.15.3;
  receiver=mx201.skynet.be;
  envelope-from="SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org";
  x-sender="SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@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 ip4:140.211.15.3 a:osgeo7.osgeo.org
  a:trac.osgeo.org a:dev.trac.osgeo.org
  a:secure.osgeo.osuosl.org ip4:140.211.15.57
  ip4:140.211.15.32 ip4:140.211.15.26 ip4:140.211.15.6"
Received-SPF: PermError (mx201.skynet.be: cannot correctly
  interpret sender authenticity information from domain of
  postmaster@lists.osgeo.org) identity=helo;
  client-ip=140.211.15.3; receiver=mx201.skynet.be;
  envelope-from="SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org";
  x-sender="postmaster@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text=""
X-Ironport-Dmarc-Check-Result: validskip
IronPort-SDR: 64343665_sVtyG6EKU6bIUiXzrrQoQrBeqhBd5VQAdoxqeBCplAhLG5k
 jEScnvtw7dzp5xrr42nan2SeOr/cDvyga76NcpQ==
X-Proximus-RemoteIp: 140.211.15.3
X-Proximus-Mfrom: SRS0=S4b2=AB=lists.osgeo.org=tiff-bounces@osgeo.org
X-Proximus-Rcpto: chris.lindelaan@skynet.be
X-IPAS-Result: =?us-ascii?q?A0FoBQBfODRk/wMP04xaHgEBCxIMQIFEC4ErgQMZAVtXK?=
 =?us-ascii?q?wIBCE2NUIgwAxaIVIk1hWWHThgBAQIBAQEBAQkuAQoJAgQBAQECBIFLAYNRh?=
 =?us-ascii?q?SIgBQEEMwYOAQIEAQEBAQMCAwEBAQEBAQMBAQEEAQEBAgEBAgQCAgEBAoEGC?=
 =?us-ascii?q?AuFLzkNgjcFAgMYDm+BCAEBAQEBAQEBAQEBAQEBAQEBAQEWAg13AQEBAQMBA?=
 =?us-ascii?q?QEFAh4eCh4OAwECBAIBAQEJDQQEAQEhAgQIAwEVDgEnCAIEEwUGBYJvglwDB?=
 =?us-ascii?q?AELqxR4gQMxgQGEcpxLBoFBAYkeiBuCC0R6GzaCdD6CYgEEiB8EmiqBNHSBI?=
 =?us-ascii?q?A5KcoEEAgkCEWuBEAhqgXlAAg1jCw5vgUmDKgQCFGQDCQMHBSwdBQsmCgMLG?=
 =?us-ascii?q?A0UPBMsFh8UH15sLRISBQMLFSpHBAg4Bhw0BgEKAggPEg8GJkQOQjczEwZiJ?=
 =?us-ascii?q?AsOEQNQQhlsB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HXuQ629R4EJmsGV0gj1XYaNu+1KDwBeOAsP+tFKH
 Po3Ls+m9PPQwV1Uu2LQlE4Ysmrnbz2fFOPW297OzcXrCOryQmj7qX3eiL24v48aUI0/V9/nF
 KqryXJoo+nu/u40Fv7yGPJ7phflbLapuerfPb88/T8pV3X+3mVWLg=
X-IronPort-Anti-Spam-Filtered: true
X-MGA-submission: =?us-ascii?q?MDHMA6jKFQ0aJdMS+9Ee9YTttVkL5QhlrNc0s1?=
 =?us-ascii?q?3aGNmRENeIbtK+BxMIRSaOdAw/2HmFYxeHKJC/BKHYTJCjoDYIRw6MXa?=
 =?us-ascii?q?gsVSFEVkTU0VI/9i1fl3s7bW8W6h8V5SCJ3ik=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; 10 Apr 2023 18:16:30 +0200
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 5CEC761346CF;
	Mon, 10 Apr 2023 09:16:01 -0700 (PDT)
Received: from avasout-peh-001.plus.net (avasout-peh-001.plus.net
 [212.159.14.17])
 by lists.osgeo.org (Postfix) with ESMTPS id 974C36142C84
 for <tiff@lists.osgeo.org>; Mon, 10 Apr 2023 09:15:59 -0700 (PDT)
Received: from Apollo ([212.159.61.44]) by smtp with ESMTPA
 id luBQp8oz4JxAaluBRpZyXB; Mon, 10 Apr 2023 17:15:58 +0100
X-Clacks-Overhead: "GNU Terry Pratchett"
X-CM-Score: 0.00
X-CNFS-Analysis: v=2.4 cv=ebkuwpIH c=1 sm=1 tr=0 ts=6434363e
 a=AGp1duJPimIJhwGXxSk9fg==:117 a=AGp1duJPimIJhwGXxSk9fg==:17
 a=DAwyPP_o2Byb1YXLmDAA:9 a=Qs8GJauRAAAA:8 a=HQAbSS7-iqE_UTS4ZFIA:9
 a=CjuIK1q_8ugA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=MsgTNiJA2FeDDat5Su4A:9
 a=rt0sbPA2JZs1wa4Q:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10
 a=frz4AuCg-hUA:10 a=-MsOl3yrPmtpHepMbiy1:22
X-AUTH: perdrix52@:2500
From: "David C. Partridge" <david.partridge@perdrix.co.uk>
To: <tiff@lists.osgeo.org>
References: <000001d96bc0$7085f3a0$5191dae0$@perdrix.co.uk>
In-Reply-To: <000001d96bc0$7085f3a0$5191dae0$@perdrix.co.uk>
Date: Mon, 10 Apr 2023 17:15:56 +0100
Message-ID: <002f01d96bc7$bc0be3a0$3423aae0$@perdrix.co.uk>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQHtNWYk753yAxX3o/fg1wZTSoaZBq79Ixbg
Content-Language: en-gb
X-CMAE-Envelope: MS4xfMqzUCQyk6sw8sWfmPS5LZv1BRhZ28PcAfv21O2cWzHpVWO/5sdKR/dwYtzPlZrW6B5SVwr/JbQXidAXe3nBSym8PZWkTcLtWMjhNr3RnyPXdQcP4vgV
 G5NIeSpo+tvfZnOU4GKsK54gvBOP3cPS93yyl9SvYhvmFP005RfJES42dFq6zh5j/cmwD2SCzphHdQ==
Subject: Re: [Tiff] CFAREPEATPATTERNDIM and CFAPATTERN
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>
Content-Type: multipart/mixed; boundary="===============5883339322010677661=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>
X-VadeSecure-Score: 0
X-VadeSecure-Verdict: clean
X-VadeSecure-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekvddguddttdcutefuod
 etggdotefrodftvfcurfhrohhfihhlvgemucfrtffqigfkofgfufenuceurghilhhouhhtmecufed
 tudenucenucfjughrpefhvfhfjgffkfggofhtufhpjefjudeftdgtvghssehmtdhgredvtddvnecu
 hfhrohhmpedfffgrvhhiugcuvedrucfrrghrthhrihgughgvfdcuoegurghvihgurdhprghrthhri
 hgughgvsehpvghrughrihigrdgtohdruhhkqeenucggtffrrghtthgvrhhnpeegheevieevteekte
 dvteevgeefvdeihedvkeegteegffehvdekudeltdefgeeivdenucfkphepudegtddrvdduuddrude
 hrdefpddvuddvrdduheelrdeiuddrgeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm
 pehinhgvthepudegtddrvdduuddrudehrdefpdhmrghilhhfrhhomhepufftufdtpefugegsvdept
 eeupehlihhsthhsrdhoshhgvghordhorhhgpehtihhffhdqsghouhhntggvshesohhsghgvohdroh
 hrghdpnhgspghrtghpthhtohepuddprhgtphhtthhopegthhhrihhsrdhlihhnuggvlhgrrghnseh
 skhihnhgvthdrsggvpdhmohguvgepshhmthhppdhgvghtqdgfrhhlkfhnshhighhhth

This is a multipart message in MIME format.

--===============5883339322010677661==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0030_01D96BD0.1DD10EF0"
Content-Language: en-gb

This is a multipart message in MIME format.

------=_NextPart_000_0030_01D96BD0.1DD10EF0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hmmm It seems that I got the *writing* about correct:




Photometric (1 Short): Unknown (32803)

::

::

33421 (2 Short): 2, 2

33422 (4 Byte): 1, 2, 0, 1

as shown by AsTiffTagViewer (is there a better tool for this?)



But the code for reading:

       uint16_t cfarepeatpatterndim[2]{ 0, 0 };

       if (TIFFGetField(m_tiff, TIFFTAG_CFAREPEATPATTERNDIM,
cfarepeatpatterndim)) 


doesn't appear to be right as it gives me crazy results in the array
cfarepeatpatterndim




From: Tiff <tiff-bounces@lists.osgeo.org> On Behalf Of David C. Partridge
Sent: 10 April 2023 16:24
To: tiff@lists.osgeo.org
Subject: [Tiff] CFAREPEATPATTERNDIM and CFAPATTERN

 

I *think* I have these two worked out:

Reading:

 

constexpr uint8_t TIFF_CFAPattern_RGGB[] { 0,1,1,2 };

constexpr uint8_t TIFF_CFAPattern_BGGR[] { 2,1,1,0 };

constexpr uint8_t TIFF_CFAPattern_GRBG[] { 1,0,2,1 };

constexpr uint8_t TIFF_CFAPattern_GBRG[] { 1,2,0,1 };


//

/ Attempt to read the CFA from the root IFD if this is a CFA image

//

if (PHOTOMETRIC_CFA == photo)

{

       uint16_t cfarepeatpatterndim[2]{ 0 };

       if (TIFFGetField(m_tiff, TIFFTAG_CFAREPEATPATTERNDIM,
&cfarepeatpatterndim))

       {

             uint16_t

                    x{ (cfarepeatpatterndim[0]) },

                    y{ (cfarepeatpatterndim[1]) };

             uint8_t* cfapattern = static_cast<uint8_t*>(_alloca(x * y));

             TIFFGetField(m_tiff, TIFFTAG_CFAPATTERN, x*y, cfapattern);

       }

}

and Writing:

TIFFSetField(m_tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_CFA);

constexpr uint16_t cfapatterndim[2]{ 2,2 };

TIFFSetField(m_tiff, TIFFTAG_CFAREPEATPATTERNDIM, cfapatterndim);

//

// Note that when writing the CFA pattern, need to specify how many

// octets are to be written.

//

switch (cfatype)

{

case CFATYPE_BGGR:

TIFFSetField(m_tiff, TIFFTAG_CFAPATTERN, 4, TIFF_CFAPattern_BGGR);

       break;

case CFATYPE_GRBG:

       TIFFSetField(m_tiff, TIFFTAG_CFAPATTERN, 4, TIFF_CFAPattern_GRBG);

       break;

case CFATYPE_GBRG:

       TIFFSetField(m_tiff, TIFFTAG_CFAPATTERN, 4, TIFF_CFAPattern_GBRG);

       break;

case CFATYPE_RGGB:

       TIFFSetField(m_tiff, TIFFTAG_CFAPATTERN, 4, TIFF_CFAPattern_RGGB);

       break;

}

I'd be most grateful if someone who knows TIFF a lot better than I would
validate that code.

However, I'm still a bit puzzled how I should read/write the data for
EXIFTAG_CFAPATTERN which is defined as:
   {EXIFTAG_CFAPATTERN, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8,

     TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 1, "CFAPattern", NULL}

as the length is a priori unknown AFAICT?

PS could someone please explain how I should interpret the meaning of e.g.
TIFF_SETGET_C16_UINT8

Thank you, David

 

 


------=_NextPart_000_0030_01D96BD0.1DD10EF0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 15 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:"Cascadia Mono";
	panose-1:2 11 6 9 2 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
span.EmailStyle21
	{mso-style-type:personal-compose;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style></head><body lang=3DEN-GB link=3D"#0563C1" vlink=3D"#954F72" =
style=3D'word-wrap:break-word'><div class=3DWordSection1><p =
class=3DMsoNormal>Hmmm It seems that I got the *<b>writing</b>* about =
correct:<br><br><br><o:p></o:p></p><p class=3DMsoNormal>Photometric (1 =
Short): Unknown (32803)<o:p></o:p></p><p =
class=3DMsoNormal>::<o:p></o:p></p><p =
class=3DMsoNormal>::<o:p></o:p></p><p class=3DMsoNormal>33421 (2 Short): =
2, 2<o:p></o:p></p><p class=3DMsoNormal>33422 (4 Byte): 1, 2, 0, =
1<br><br>as shown by AsTiffTagViewer (is there a better tool for =
this?)<br><br><o:p></o:p></p><p class=3DMsoNormal =
style=3D'text-autospace:none'>But the code for reading:<br><br><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black;mso-ligatures:none;mso-fareast-language:EN-GB'>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF;mso-ligatures:none;mso-fareast-language:EN-GB'>uint16=
_t</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black;mso-ligatures:none;mso-fareast-language:EN-GB'> =
cfarepeatpatterndim[2]{ 0, 0 };<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black;mso-ligatures:none;mso-fareast-language:EN-GB'>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue;mso-ligatures:none;mso-fareast-language:EN-GB'>if</span>=
<span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black;mso-ligatures:none;mso-fareast-language:EN-GB'> =
(TIFFGetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A;mso-ligatures:none;mso-fareast-language:EN-GB'>TIFFTA=
G_CFAREPEATPATTERNDIM</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black;mso-ligatures:none;mso-fareast-language:EN-GB'>, =
cfarepeatpatterndim))</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
<o:p></o:p></span></p><p class=3DMsoNormal><br>doesn&#8217;t appear to =
be right as it gives me crazy results in the array =
cfarepeatpatterndim<br><br><br><o:p></o:p></p><div><div =
style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm'><p class=3DMsoNormal><b><span lang=3DEN-US =
style=3D'mso-ligatures:none;mso-fareast-language:EN-GB'>From:</span></b><=
span lang=3DEN-US =
style=3D'mso-ligatures:none;mso-fareast-language:EN-GB'> Tiff =
&lt;tiff-bounces@lists.osgeo.org&gt; <b>On Behalf Of </b>David C. =
Partridge<br><b>Sent:</b> 10 April 2023 16:24<br><b>To:</b> =
tiff@lists.osgeo.org<br><b>Subject:</b> [Tiff] CFAREPEATPATTERNDIM and =
CFAPATTERN<o:p></o:p></span></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal =
style=3D'text-autospace:none'>I *<b>think</b>* I have these two worked =
out:<br><br>Reading:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><o:p>&nbsp;</o:p></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>constexpr</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
TIFF_CFAPattern_RGGB[] { 0,1,1,2 };<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>constexpr</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
TIFF_CFAPattern_BGGR[] { 2,1,1,0 };<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>constexpr</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
TIFF_CFAPattern_GRBG[] { 1,0,2,1 };<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>constexpr</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
TIFF_CFAPattern_GBRG[] { 1,2,0,1 };<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><br><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:green'>//</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:green'>/ =
Attempt to read the CFA from the root IFD if this is a CFA =
image</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:green'>//</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>if</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
(</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>PHOTOMETRIC_CFA</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
=3D=3D photo)<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>{<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint16_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
cfarepeatpatterndim[2]{ 0 };<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>if</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
(TIFFGetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAREPEATPATTERNDIM</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, =
&amp;cfarepeatpatterndim))<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
{<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint16_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x{ =
(cfarepeatpatterndim[0]) },<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y{ =
(cfarepeatpatterndim[1]) };<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>* =
cfapattern =3D </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>static_cast</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&lt;</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint8_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>*&gt;(_alloca(x * y));<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; TIFFGetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, x*y, =
cfapattern);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>}<br><br>and Writing:<br><br>TIFFSetField(m_tiff, =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_PHOTOMETRIC</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>PHOTOMETRIC_CFA</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>constexpr</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#2B91AF'>uint16_t</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
cfapatterndim[2]{ 2,2 };<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>TIFFSetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAREPEATPATTERNDIM</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, =
cfapatterndim);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:green'>//</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:green'>// =
Note that when writing the CFA pattern, need to specify how =
many</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:green'>// =
octets are to be written.</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:green'>//</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'><o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>switch</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
(cfatype)<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>{<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>case</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>CFATYPE_BGGR</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>:<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-indent:36.0pt;text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>TIFFSetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 4, =
TIFF_CFAPattern_BGGR);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>break</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>;<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>c</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>ase</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>CFATYPE_GRBG</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>:<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
TIFFSetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 4, =
TIFF_CFAPattern_GRBG);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>break</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>;<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>case</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>CFATYPE_GBRG</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>:<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
TIFFSetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 4, =
TIFF_CFAPattern_GBRG);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>break</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>;<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>case</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>CFATYPE_RGGB</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>:<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
TIFFSetField(m_tiff, </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>TIFFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 4, =
TIFF_CFAPattern_RGGB);<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-autospace:none'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:blue'>break</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>;<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>}<br><br>I&#8217;d be most grateful if someone who =
knows TIFF a lot better than I would validate that =
code.<br></span><br>However, I&#8217;m still a bit puzzled how I should =
read/write the <span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>data for </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>EXIFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'> which =
is defined as:<br>&nbsp;&nbsp; {</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>EXIFTAG_CFAPATTERN</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, -1, =
-1, </span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>TIFF_UNDEFINED</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 0, =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>TIFF_SETGET_C16_UINT8</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>,<o:p></o:p></span></p><p class=3DMsoNormal =
style=3D'margin-bottom:12.0pt'><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>&nbsp;&nbsp;&nbsp;&nbsp; </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>TIFF_SETGET_UNDEFINED</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>FIELD_CUSTOM</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, 1, =
1, </span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#A31515'>&quot;CFAPattern&quot;</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia Mono";color:black'>, =
</span><span style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:#6F008A'>NULL</span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:black'>}<br><br>as the length is a priori unknown =
AFAICT?<br><br>PS could someone please explain how I should interpret =
the meaning of e.g. </span><span =
style=3D'font-size:9.5pt;font-family:"Cascadia =
Mono";color:darkslategray'>TIFF_SETGET_C16_UINT8</span><o:p></o:p></p><p =
class=3DMsoNormal><span =
style=3D'mso-ligatures:none;mso-fareast-language:EN-GB'>Thank you, =
David<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'mso-ligatures:none;mso-fareast-language:EN-GB'><o:p>&nbsp;</o:p>=
</span></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></body></html>
------=_NextPart_000_0030_01D96BD0.1DD10EF0--


--===============5883339322010677661==
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

--===============5883339322010677661==--

