Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas023.isp.belgacom.be (localhost [127.0.0.1])
        by inav012.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k9ELZQNS000463
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 23:35:26 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx016.isp.belgacom.be (inmx016.isp.belgacom.be [195.238.4.219])
        by inas023.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k9ELZNjp009494
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 23:35:23 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx016.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9ELZEcY024923
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 23:35:14 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9ELN6iO004424;
	Sat, 14 Oct 2006 17:23:48 -0400
Received: from tomts20-srv.bellnexxia.net (tomts20.bellnexxia.net
	[209.226.175.74])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9ELN4lS004421
	for <tiff@lists.maptools.org>; Sat, 14 Oct 2006 17:23:04 -0400
Received: from [192.168.1.119] ([69.158.10.184]) by tomts20-srv.bellnexxia.net
	(InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id
	<20061014212257.WDJZ16051.tomts20-srv.bellnexxia.net@[192.168.1.119]>;
	Sat, 14 Oct 2006 17:22:57 -0400
In-Reply-To: <11848b2f0610140753v457d2255t4db2885c955b06ec@mail.gmail.com>
References: <200610141459.01824.marcel.wiesweg@gmx.de>
	<11848b2f0610140629k198011cbte1cf233ed05db53e@mail.gmail.com>
	<4CA12896-5A60-4BA3-97EC-B257D0ABE422@smartgames.ca>
	<11848b2f0610140753v457d2255t4db2885c955b06ec@mail.gmail.com>
Mime-Version: 1.0 (Apple Message framework v752.2)
Message-Id: <7A4D2FC7-5A59-4D68-8E77-2C28B11412A7@smartgames.ca>
From: Toby Thain <toby@smartgames.ca>
Subject: Re: [Tiff] SamplesPerPixel is 0 when loading image
Date: Sat, 14 Oct 2006 17:22:57 -0400
To: "Anurag Singh" <contact.anurag@gmail.com>
X-Mailer: Apple Mail (2.752.2)
Cc: TIFF mailing list <tiff@lists.maptools.org>
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0434148623=="
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00001bf2
X-MSP-STORE: Sat, 14 Oct 2006 23:35:32 +0200
Status:   


--===============0434148623==
Content-Type: multipart/alternative; boundary=Apple-Mail-1-17667622


--Apple-Mail-1-17667622
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On 14-Oct-06, at 10:53 AM, Anurag Singh wrote:

>
> On 10/14/06, Toby Thain <toby@smartgames.ca > wrote:
>
> On 14-Oct-06, at 9:29 AM, Anurag Singh wrote:
>
>>
>> i have just checked IMG_4224-01.tiff, it has sampleperpixel 3. But  
>> why are you calling this function TIFFGetFieldDefaulted(tif,  
>> TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel) to know about  
>> sampleperpixel .
>
>
> >>Because that tag may be omitted (default value is 1) - see spec.
>
>  yeah . i have seen spec, but we are using libtiif here, so we have  
> to see this function only
> int TIFFDefaultDirectory(TIFF* tif),  Act the point is this libtiff  
> take care of it, if tag is not present then it always return  
> default value for important tags such as for samplesperpixel.

I don't happen to use that function.

--T

>
> If you don't believe then you can check it.
>
> Anurag Singh
>
> --Toby
>
>>
>> i always used TIFFGetField( input_tiff, TIFFTAG_SAMPLESPERPIXEL,  
>> &samplesperpixel );
>> and i didn't get any problem with samplesperpixel, outcomes are  
>> always same during my testing period.
>>
>> Anurag Singh
>>
>>
>>
>> On 10/14/06, Marcel Wiesweg <marcel.wiesweg@gmx.de > wrote:
>> Hi,
>>
>> for the application digiKam ( www.digikam.org) we are using  
>> libtiff in our
>> image loader. A while ago we received a bug report from a user  
>> that opening
>> certain 16-bit TIFF images failed. The report was later on  
>> confirmed by
>> another user.
>> Strangely, on other systems (on most systems, including mine) the  
>> test image
>> loads without any problems.
>>
>> We investigated that the problem is that after calling
>>    TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL,  
>> &samples_per_pixel);
>> the value of samples_per_pixel is "0" on the affected machines,  
>> "3" on all
>> others. This has been tested with different versions of libtiff.
>>
>> The full story can be found here:
>> http://bugs.kde.org/show_bug.cgi?id=125916
>>
>> The test image is
>> http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.tif
>>
>> The source of out TIFF loader can be found at
>> http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/ 
>> loaders/tiffloader.cpp?view=auto
>>
>> Have you any idea what to do about this?
>> Thank you
>>
>> Marcel
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>>
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>
>
>


--Apple-Mail-1-17667622
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><BR><DIV><DIV>On 14-Oct-06, at =
10:53 AM, Anurag Singh wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV>=A0</DI=
V> <DIV><SPAN class=3D"gmail_quote">On 10/14/06, <B =
class=3D"gmail_sendername">Toby Thain</B> &lt;<A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" href=3D"mailto:toby@smartgames.ca" =
target=3D"_blank">toby@smartgames.ca</A> &gt; wrote:</SPAN> <BLOCKQUOTE =
class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px =
0.8ex; BORDER-LEFT: #ccc 1px solid"> <DIV style=3D"WORD-WRAP: =
break-word"><BR> <DIV><SPAN> <DIV>On 14-Oct-06, at 9:29 AM, Anurag Singh =
wrote:</DIV><BR> <BLOCKQUOTE type=3D"cite"> <DIV>=A0</DIV> <DIV>i have =
just checked IMG_4224-01.tiff, it has sampleperpixel 3. But why are you =
calling this function TIFFGetFieldDefaulted(tif, =
TIFFTAG_SAMPLESPERPIXEL, &amp;samples_per_pixel) to know about =
sampleperpixel .</DIV></BLOCKQUOTE> <DIV><BR>=A0</DIV></SPAN> =
<DIV>&gt;&gt;Because that tag may be omitted (default value is 1) - see =
spec.</DIV></DIV></DIV></BLOCKQUOTE> <DIV>=A0</DIV> <DIV><SPAN>=A0yeah . =
i have seen spec, but we are using libtiif here, so we have to see this =
function only</SPAN></DIV> <DIV><SPAN><P><FONT color=3D"#0000ff" =
size=3D"2">int </FONT><FONT size=3D"2">TIFFDefaultDirectory(TIFF* tif),=A0=
 </FONT><FONT size=3D"2">Act the point is this libtiff take care of it, =
if tag is not present then it always return default value for important =
tags such as for =
samplesperpixel.<BR></FONT></P></SPAN></DIV></DIV></BLOCKQUOTE><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>I don't happen to use that =
function.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>--T</DIV><BR><BLOCKQUOTE =
type=3D"cite"><DIV><DIV><SPAN><P><FONT size=3D"2"> </FONT></P><P><FONT =
size=3D"2">If you don't believe then you can check =
it.</FONT></P><P><FONT size=3D"2">Anurag Singh</FONT></P></SPAN></DIV> =
<BLOCKQUOTE class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: =
0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <DIV style=3D"WORD-WRAP: =
break-word"> <DIV> <DIV>--Toby</DIV><BR> <BLOCKQUOTE type=3D"cite"> =
<DIV><SPAN> <DIV>=A0</DIV> <DIV>i always used <FONT =
size=3D"2">TIFFGetField( input_tiff, TIFFTAG_SAMPLESPERPIXEL, =
&amp;samplesperpixel );</FONT></DIV> <DIV><FONT size=3D"2">and i didn't =
get any problem with samplesperpixel, outcomes are=A0always same during =
my testing period.</FONT></DIV> <DIV><FONT size=3D"2"></FONT>=A0</DIV> =
<DIV><FONT size=3D"2">Anurag Singh</FONT></DIV> <DIV><FONT =
size=3D"2"></FONT><BR><BR>=A0</DIV> <DIV><SPAN class=3D"gmail_quote">On =
10/14/06, <B class=3D"gmail_sendername">Marcel Wiesweg</B> &lt;<A =
onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"mailto:marcel.wiesweg@gmx.de" =
target=3D"_blank">marcel.wiesweg@gmx.de </A>&gt; wrote:</SPAN> =
<BLOCKQUOTE class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: =
0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<BR><BR>for the =
application digiKam (<A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" href=3D"http://www.digikam.org/" =
target=3D"_blank"> www.digikam.org</A>) we are using libtiff in our =
<BR>image loader. A while ago we received a bug report from a user that =
opening<BR>certain 16-bit TIFF images failed. The report was later on =
confirmed by<BR>another user. <BR>Strangely, on other systems (on most =
systems, including mine) the test image <BR>loads without any =
problems.<BR><BR>We investigated that the problem is that after =
calling<BR>=A0=A0 TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, =
&amp;samples_per_pixel); <BR>the value of samples_per_pixel is "0" on =
the affected machines, "3" on all <BR>others. This has been tested with =
different versions of libtiff.<BR><BR>The full story can be found =
here:<BR><A onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"http://bugs.kde.org/show_bug.cgi?id=3D125916" target=3D"_blank"> =
http://bugs.kde.org/show_bug.cgi?id=3D125916</A><BR><BR>The test image =
is <BR><A onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.tif" =
target=3D"_blank">http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.t=
if </A><BR><BR>The source of out TIFF loader can be found at<BR><A =
onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/l=
oaders/tiffloader.cpp?view=3Dauto" target=3D"_blank"> =
http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/loaders/t=
iffloader.cpp?view=3Dauto</A><BR><BR>Have you any idea what to do about =
this?<BR>Thank =
you<BR><BR>Marcel<BR>_______________________________________________ =
<BR>Tiff mailing list: <A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" =
href=3D"mailto:Tiff@lists.maptools.org" =
target=3D"_blank">Tiff@lists.maptools.org</A><BR><A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" =
href=3D"http://lists.maptools.org/mailman/listinfo/tiff" =
target=3D"_blank"> =
http://lists.maptools.org/mailman/listinfo/tiff</A><BR><A =
onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"http://www.remotesensing.org/libtiff/" =
target=3D"_blank">http://www.remotesensing.org/libtiff/</A><BR></BLOCKQUOT=
E> </DIV><BR></SPAN></DIV> <DIV style=3D"MARGIN: =
0px">_______________________________________________</DIV><SPAN> <DIV =
style=3D"MARGIN: 0px">Tiff mailing list: <A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" =
href=3D"mailto:Tiff@lists.maptools.org" =
target=3D"_blank">Tiff@lists.maptools.org</A></DIV> <DIV style=3D"MARGIN: =
0px"><A onclick=3D"return top.js.OpenExtLink(window,event,this)" =
href=3D"http://lists.maptools.org/mailman/listinfo/tiff" =
target=3D"_blank">http://lists.maptools.org/mailman/listinfo/tiff</A></DIV=
> <DIV style=3D"MARGIN: 0px"><A onclick=3D"return =
top.js.OpenExtLink(window,event,this)" =
href=3D"http://www.remotesensing.org/libtiff/" =
target=3D"_blank">http://www.remotesensing.org/libtiff/</A></DIV></SPAN></=
BLOCKQUOTE></DIV><BR> =
=A0</DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>=

--Apple-Mail-1-17667622--

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

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0434148623==--
