Return-Path: <SRS0=+K8f=AM=lists.osgeo.org=tiff-bounces@osgeo.org>
Delivered-To: filtered@awaresystems.be
Received: from mx1.pub.mailpod8-cph3.one.com ([10.27.38.11])
	by mailstorage22.cst.mailpod8-cph3.one.com with LMTP
	id EH9bH1GXQmQ1GAAAwT5NuQ
	(envelope-from <SRS0=+K8f=AM=lists.osgeo.org=tiff-bounces@osgeo.org>)
	for <filtered@awaresystems.be>; Fri, 21 Apr 2023 14:01:53 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=custmx.one.com; s=20201015;
	h=sender:content-type:list-subscribe:list-help:list-post:list-unsubscribe:
	 list-id:subject:mime-version:message-id:date:in-reply-to:references:cc:to:from:
	 x-halone-refid:x-halone-sa:from:x-halone-sa:x-halone-refid;
	bh=Yi6HjMLd/LwZIjnNWqHAIBwwSqjIjFQxAdAVy6eF8DA=;
	b=v+XLFucYR85N+upQIdaz+aNzetiHRol/z4Kpsz1Y4JE/AdCz52Kmy102jjT/W4IoTkNLC1VdZzVJ9
	 vyjHA87ZwJT7T/XFDqC12R64joD9BqV8m6292BCDK7x6gFXZFSNVb2sz2tnzfr9Ul/pee3XodzCfxa
	 6UkjR51SZLygZNCRBhbtrrq5LHxl426xUrcdcT4/FeFgOCekA6XQmzxLWMD/bhgSBuL4hn3d3je/k0
	 0JwCQp2U3l9+joQI4zkNYEHE0vH1dKIoz5BYwvMF4byHsI2kk3j39CPyQpDIKNdZPYFATgoiAr32yC
	 BV5Kd7XA+zk9000c/webRSn8AzB1NbA==
X-HalOne-SA: -0.3
X-HalOne-RefID: 155866::1682085711-B2683F2D-46E8131B/0/0
X-HalOne-ID: 0ef44c49-e04d-11ed-8646-98039b0f6c32
Received: from lists.osgeo.org (osgeo6.osgeo.osuosl.org [140.211.15.3])
	by mx1.pub.mailpod8-cph3.one.com (Halon) with ESMTPS
	id 0ef44c49-e04d-11ed-8646-98039b0f6c32;
	Fri, 21 Apr 2023 14:01:51 +0000 (UTC)
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id C998D6126C1E;
	Fri, 21 Apr 2023 07:01:45 -0700 (PDT)
Authentication-Results: lists.osgeo.org;
	dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=freenet.de header.i=@freenet.de header.b="wan66f6E";
	dkim-atps=neutral
Received: from mout3.freenet.de (mout3.freenet.de [195.4.92.93])
 by lists.osgeo.org (Postfix) with ESMTPS id 69CE16146818
 for <tiff@lists.osgeo.org>; Fri, 21 Apr 2023 07:01:41 -0700 (PDT)
Received: from [195.4.92.126] (helo=sub7.freenet.de)
 by mout3.freenet.de with esmtpa (ID sulau@freenet.de) (port 25) (Exim 4.94.2
 #2) id 1pprKO-002CZh-9i; Fri, 21 Apr 2023 16:01:38 +0200
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freenet.de; 
 s=mjaymdexmjqk;
 h=Content-Type:MIME-Version:Message-ID:Date:Subject:
 In-Reply-To:References:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=N1jj6pVx4aeCB7xhWuVQVGIDESV3S5vCFCrusMScP4c=; b=wan66f6EfvC+TpJHy+i8896XLI
 /31Re5CLk+X6P4NDV1Wk/lA0yHiaQpCwsIpSF4d+LdX4woGKCz/ZhrWTIfefQTWjGkRUgAT0I05U5
 BuYlWn9svxN1LQ29z36FV3/zK4dhgEewb2CZ4D881aTMRWt8yGBobmlI/tGFM5TgLXjvEaLv110hJ
 3c3O5iIOPQYyM9a6STCcKCWtiF7qTukeKKQgu9i6U0mf6zR4KYGcQw7zulLa+5QkgSk5ZqV3h05XQ
 MAiv653DxKJ4zJn8GsJNnmZRijBAigYS+UR5SEsjgxl7xpY0EkiB+YJ/qLliQvGs7bBZyTf667xoW
 r84sHXDQ==;
Received: from ip-109-192-210-003.um38.pools.vodafone-ip.de
 ([109.192.210.3]:54946 helo=AGUA)
 by sub7.freenet.de with esmtpsa (ID sulau@freenet.de)
 (TLS1.2:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (port 587) (Exim
 4.94.2 #2) id 1pprKT-00CmDF-SK; Fri, 21 Apr 2023 16:01:37 +0200
From: "Sulau" <sulau@freenet.de>
To: "'Ganesh Bondili'" <Ganesh.Bondili@kofax.com>
Cc: <tiff@lists.osgeo.org>
References: <598bb608-7a9f-4d74-9694-50b4b61cfb41.4d58ee2f-366f-4e18-a275-c38e2c573102.f88e71bb-28a6-430d-9878-bade07aa2119@emailsignatures365.codetwo.com>
 <598bb608-7a9f-4d74-9694-50b4b61cfb41.3126c205-b944-45b6-a105-b070fccc3fc9.bcc73e7c-a66f-4da6-8b89-4b92db5f2741@emailsignatures365.codetwo.com>
 <SJ0PR04MB72485C37B485E67F0AFE13AD9D629@SJ0PR04MB7248.namprd04.prod.outlook.com>
 <alpine.GSO.2.20.2304190939400.18238@scrappy.simplesystems.org>
 <SJ0PR04MB7248108E1627A450118C84E89D629@SJ0PR04MB7248.namprd04.prod.outlook.com>
In-Reply-To: <SJ0PR04MB7248108E1627A450118C84E89D629@SJ0PR04MB7248.namprd04.prod.outlook.com>
Date: Fri, 21 Apr 2023 16:01:37 +0200
Message-ID: <!&!AAAAAAAAAAAYAAAAAAAAAEUNXr1cc6FEs82BI4LfFJfCgAAAEAAAAA4rIUamywBGnv45N+Ge8cYBAAAAAA==@freenet.de>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 15.0
Thread-Index: AQKLbtfh4z1gLn8biVJPQJ/GSbg/WAGhC6GMAm4JPH8CTqQzQgJmLRz3rYu0KZA=
Content-Language: de
X-FN-MUUID: 168208569793861B659157O
X-Originated-At: 109.192.210.3!54946
X-Scan-TS: Fri, 21 Apr 2023 16:01:37 +0200
Subject: Re: [Tiff] [EXTERNAL] Re: Specific image fails with error at
 TIFFWriteRawStrip function(26659675)
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="===============8610952032071788464=="
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

This is a multipart message in MIME format.

--===============8610952032071788464==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0000_01D9746A.8E602000"
Content-Language: de

This is a multipart message in MIME format.

------=_NextPart_000_0000_01D9746A.8E602000
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Ganesh

 

With the testfile LibTIFFCrsh1.cpp I get the error message:
"TIFFWriteRawStrip: Must set "ImageWidth" before writing data."

 

That is, you can't just create a default TIFF directory (out =
TIFFOpen(sInputSinglePage.c_str(), "w");) and then write image data to that
directory without first setting up the mandatory tags accordingly.

 

Finally, you have to write the TIFF directory to the file. This is done by
TIFFClose().

You should also close the input file at the end.

 

Finally, the input image data are "Group3Fax" compressed. That means the
function TIFFReadRawStrip() reads nonsense. You need to read with
TIFFReadEncodedStrip().

 

You should read the TIFF documentation at:
http://www.simplesystems.org/libtiff/index.html  

and get familiar with copying of data using as example:
https://gitlab.com/libtiff/libtiff/-/blob/master/tools/tiffcp.c . I would
suggest taking tiffcp.c in the debugger and debug how your file is copied
there.

 

Another example, how to write a simple TIFF image is given in
https://gitlab.com/libtiff/libtiff/-/blob/master/test/custom_dir.c line 63
to 128.

 

Regards

Su

 

Von: Tiff [mailto:tiff-bounces@lists.osgeo.org] Im Auftrag von Ganesh
Bondili via Tiff
Gesendet: Mittwoch, 19. April 2023 20:11
An: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Cc: 'tiff@lists.osgeo.org' <tiff@lists.osgeo.org>
Betreff: Re: [Tiff] [EXTERNAL] Re: Specific image fails with error at
TIFFWriteRawStrip function(26659675)

 

Thank you Bob for the information. Does this mean the TIFF internal data is
Huge size for example 4GB or more. But the file Test.TIFF itself is just 370
KB.

Hi LibTIFF team, Are there any other replies suggesting root-cause for this
Test.TIFF error. Is the Test.TIFF is as per TIFF standard. Are there any
other problems with this input TIFF or solution to successfully copy/write
strips individually to TIFF files. Why is the size of single strip is
returned as such a huge size(IS any field has wrong data). Will 64 bit of
LibTIFF binaries will resolve this issue is some way.

Regards,
Ganesh.


------=_NextPart_000_0000_01D9746A.8E602000
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
p.emailquote, li.emailquote, div.emailquote
	{mso-style-name:emailquote;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:1.0pt;
	border:none;
	padding:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage19
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DDE link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Hi Ganesh<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>With the testfile LibTIFFCrsh1.cpp I get the =
error message: &#8220;TIFFWriteRawStrip: Must set &quot;ImageWidth&quot; =
before writing data.&#8221;<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>That is, you can't just create a default =
TIFF directory (out =3D TIFFOpen(sInputSinglePage.c_str(), =
&quot;w&quot;);) and then write image data to that directory without =
first setting up the mandatory tags accordingly.<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Finally, you have to write the TIFF =
directory to the file. This is done by =
TIFFClose().<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>You should also close the input file at the =
end.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Finally, the input image data are =
&#8220;Group3Fax&#8221; compressed. That means the function =
TIFFReadRawStrip() reads nonsense. You need to read with =
TIFFReadEncodedStrip().<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>You should read the TIFF documentation at: =
<a =
href=3D"http://www.simplesystems.org/libtiff/index.html">http://www.simpl=
esystems.org/libtiff/index.html</a> &nbsp;<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>and get familiar with copying of data using =
as example: <a =
href=3D"https://gitlab.com/libtiff/libtiff/-/blob/master/tools/tiffcp.c">=
https://gitlab.com/libtiff/libtiff/-/blob/master/tools/tiffcp.c</a> . I =
would suggest taking tiffcp.c in the debugger and debug how your file is =
copied there.<o:p></o:p></span></p><p class=3DMsoNormal><span =
lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Another example, how to write a simple TIFF =
image is given in =
https://gitlab.com/libtiff/libtiff/-/blob/master/test/custom_dir.c line =
63 to 128.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Regards<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'>Su<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-GB =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;=
mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><div><div =
style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm'><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>Von:</span></=
b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Tiff [mailto:tiff-bounces@lists.osgeo.org] <b>Im Auftrag von </b>Ganesh =
Bondili via Tiff<br><b>Gesendet:</b> Mittwoch, 19. April 2023 =
20:11<br><b>An:</b> Bob Friesenhahn =
&lt;bfriesen@simple.dallas.tx.us&gt;<br><b>Cc:</b> =
'tiff@lists.osgeo.org' &lt;tiff@lists.osgeo.org&gt;<br><b>Betreff:</b> =
Re: [Tiff] [EXTERNAL] Re: Specific image fails with error at =
TIFFWriteRawStrip function(26659675)<o:p></o:p></span></p></div></div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><p class=3DMsoNormal><span =
style=3D'font-size:10.0pt'>Thank you Bob for the information. Does this =
mean the TIFF internal data is Huge size for example 4GB or more. But =
the file Test.TIFF itself is just 370 KB.<br><br>Hi LibTIFF team, Are =
there any other replies suggesting root-cause for this Test.TIFF error. =
Is the Test.TIFF is as per TIFF standard. Are there any other problems =
with this input TIFF or solution to successfully copy/write strips =
individually to TIFF files. Why is the size of single strip is returned =
as such a huge size(IS any field has wrong data). Will 64 bit of LibTIFF =
binaries will resolve this issue is some =
way.<br><br>Regards,<br>Ganesh.<o:p></o:p></span></p><p><span =
style=3D'font-size:7.5pt;font-family:"Arial",sans-serif'> </span><span =
style=3D'font-size:10.0pt;font-family:"Arial",sans-serif'><o:p></o:p></sp=
an></p></div></div></body></html>
------=_NextPart_000_0000_01D9746A.8E602000--


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

--===============8610952032071788464==--

