Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas019.isp.belgacom.be (localhost [127.0.0.1])
        by inav010.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k9EF5KSw022305
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 17:05:20 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx018.isp.belgacom.be (inmx018.isp.belgacom.be [195.238.4.79])
        by inas019.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k9EF5FbP009067
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 17:05:16 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx018.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k9EF5Eup004069
        for <joris.at.lebbeke@skynet.be>; Sat, 14 Oct 2006 17:05: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 k9EErd3W027689;
	Sat, 14 Oct 2006 10:54:02 -0400
Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k9EErawB027686
	for <tiff@lists.maptools.org>; Sat, 14 Oct 2006 10:53:36 -0400
Received: by wx-out-0506.google.com with SMTP id s7so1119368wxc
	for <tiff@lists.maptools.org>; Sat, 14 Oct 2006 07:53:35 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references;
	b=nERMYp8QAwLm8p3UeGAIms8EEYkTzEO8DJl9vg0gG2L+t5WLZ8Eb73drV6wHh/gs+YoKnvcWE9i8yVrmOw5V8OO1QQ3XrIeQFpFVbITRVjENn5XA2Q6MRmQ+rO4arJkNg83AFAMFF537loFmTuawc3pbWWBrGajwSZMBnmfukHs=
Received: by 10.70.77.2 with SMTP id z2mr7505623wxa;
	Sat, 14 Oct 2006 07:53:35 -0700 (PDT)
Received: by 10.70.125.8 with HTTP; Sat, 14 Oct 2006 07:53:35 -0700 (PDT)
Message-ID: <11848b2f0610140753v457d2255t4db2885c955b06ec@mail.gmail.com>
Date: Sat, 14 Oct 2006 20:23:35 +0530
From: "Anurag Singh" <contact.anurag@gmail.com>
To: "Toby Thain" <toby@smartgames.ca>
Subject: Re: [Tiff] SamplesPerPixel is 0 when loading image
In-Reply-To: <4CA12896-5A60-4BA3-97EC-B257D0ABE422@smartgames.ca>
MIME-Version: 1.0
References: <200610141459.01824.marcel.wiesweg@gmx.de>
	<11848b2f0610140629k198011cbte1cf233ed05db53e@mail.gmail.com>
	<4CA12896-5A60-4BA3-97EC-B257D0ABE422@smartgames.ca>
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="===============0944619252=="
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00001bed
X-MSP-STORE: Sat, 14 Oct 2006 17:05:27 +0200
Status:   

--===============0944619252==
Content-Type: multipart/alternative; 
	boundary="----=_Part_76226_12315398.1160837615730"

------=_Part_76226_12315398.1160837615730
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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.

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/
>
>
>
>

------=_Part_76226_12315398.1160837615730
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>&nbsp;</div>
<div><span class="gmail_quote">On 10/14/06, <b class="gmail_sendername">Toby Thain</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:toby@smartgames.ca" target="_blank">toby@smartgames.ca</a>
&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word"><br>
<div><span>
<div>On 14-Oct-06, at 9:29 AM, Anurag Singh wrote:</div><br>
<blockquote type="cite">
<div>&nbsp;</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>&nbsp;</div></span>
<div>&gt;&gt;Because that tag may be omitted (default value is 1) - see spec.</div></div></div></blockquote>

<div>&nbsp;</div>
<div><span>&nbsp;yeah . 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="#0000ff" size="2">int </font><font size="2">TIFFDefaultDirectory(TIFF* tif),&nbsp; </font><font size="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.
</font></p>
<p><font size="2">If you don't believe then you can check it.</font></p>
<p><font size="2">Anurag Singh</font></p></span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div>
<div>--Toby</div><br>
<blockquote type="cite">
<div><span>
<div>&nbsp;</div>
<div>i always used <font size="2">TIFFGetField( input_tiff, TIFFTAG_SAMPLESPERPIXEL, &amp;samplesperpixel );</font></div>
<div><font size="2">and i didn't get any problem with samplesperpixel, outcomes are&nbsp;always same during my testing period.</font></div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2">Anurag Singh</font></div>
<div><font size="2"></font><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/14/06, <b class="gmail_sendername">Marcel Wiesweg</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:marcel.wiesweg@gmx.de" target="_blank">marcel.wiesweg@gmx.de 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>for the application digiKam (<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.digikam.org/" target="_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>&nbsp;&nbsp; TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &amp;samples_per_pixel); 
<br>the value of samples_per_pixel is &quot;0&quot; on the affected machines, &quot;3&quot; 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="return top.js.OpenExtLink(window,event,this)" href="http://bugs.kde.org/show_bug.cgi?id=125916" target="_blank">
http://bugs.kde.org/show_bug.cgi?id=125916</a><br><br>The test image is <br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.tif" target="_blank">http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.tif 
</a><br><br>The source of out TIFF loader can be found at<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/loaders/tiffloader.cpp?view=auto" target="_blank">
http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/loaders/tiffloader.cpp?view=auto</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="return top.js.OpenExtLink(window,event,this)" href="mailto:Tiff@lists.maptools.org" target="_blank">Tiff@lists.maptools.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.maptools.org/mailman/listinfo/tiff" target="_blank">
http://lists.maptools.org/mailman/listinfo/tiff</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.remotesensing.org/libtiff/" target="_blank">http://www.remotesensing.org/libtiff/</a><br></blockquote>
</div><br></span></div>
<div style="MARGIN: 0px">_______________________________________________</div><span>
<div style="MARGIN: 0px">Tiff mailing list: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tiff@lists.maptools.org" target="_blank">Tiff@lists.maptools.org</a></div>
<div style="MARGIN: 0px"><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.maptools.org/mailman/listinfo/tiff" target="_blank">http://lists.maptools.org/mailman/listinfo/tiff</a></div>
<div style="MARGIN: 0px"><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.remotesensing.org/libtiff/" target="_blank">http://www.remotesensing.org/libtiff/</a></div></span></blockquote></div><br>
&nbsp;</div></blockquote></div><br>

------=_Part_76226_12315398.1160837615730--

--===============0944619252==
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/
--===============0944619252==--
