Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-k.one.com (mx-k.one.com [91.198.169.58])
	by mail6.b-one.net (Postfix) with ESMTP id CA59480103504
	for <filtered@awaresystems.be>; Wed, 18 Jul 2012 13:48:39 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
Received-SPF: pass (mx-k: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.220.176 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176])
	by mx-k.one.com (Postfix) with ESMTP id 66FD69DA08C
	for <filtered@awaresystems.be>; Wed, 18 Jul 2012 11:48:39 +0000 (UTC)
Received: by vcbfl11 with SMTP id fl11so1395021vcb.21
        for <filtered@awaresystems.be>; Wed, 18 Jul 2012 04:48:38 -0700 (PDT)
Received: by 10.220.240.5 with SMTP id ky5mr400113vcb.57.1342612118677;
        Wed, 18 Jul 2012 04:48:38 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.58.208.231 with SMTP id mh7csp66913vec;
        Wed, 18 Jul 2012 04:48:38 -0700 (PDT)
Received: by 10.52.30.68 with SMTP id q4mr311466vdh.131.1342612110006;
        Wed, 18 Jul 2012 04:48:30 -0700 (PDT)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.57 as permitted sender) client-ip=91.198.169.57;
Received: by 10.230.170.23 with POP3 id b23mf5287527vbz.35;
        Wed, 18 Jul 2012 04:48:29 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.one.com (mx-j.one.com [91.198.169.57])
	by mail6.b-one.net (Postfix) with ESMTP id 2B51680150C63
	for <info@awaresystems.be>; Wed, 18 Jul 2012 13:09:06 +0200 (CEST)
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-j.one.com (Postfix) with ESMTP id BD78E63762
	for <info@awaresystems.be>; Wed, 18 Jul 2012 11:09:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 4D8781EDB02;
	Wed, 18 Jul 2012 06:06:23 -0500 (EST)
Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com
	[209.85.214.172])
	by lists.maptools.org (Postfix) with ESMTPS id 31C961EDB02
	for <tiff@lists.maptools.org>; Wed, 18 Jul 2012 06:01:15 -0500 (EST)
Received: by obbwc20 with SMTP id wc20so1948649obb.3
	for <tiff@lists.maptools.org>; Wed, 18 Jul 2012 04:01:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.182.162.101 with SMTP id xz5mr548815obb.47.1342609274414; Wed,
	18 Jul 2012 04:01:14 -0700 (PDT)
Received: by 10.76.135.198 with HTTP; Wed, 18 Jul 2012 04:01:14 -0700 (PDT)
Date: Wed, 18 Jul 2012 13:01:14 +0200
Message-ID: <CADH5xWpez5P7t+3vp4T3wCUwDLgRNrOQXX_PVWL9b7B5cUGPaQ@mail.gmail.com>
From: Jorge Martin <jormarfe@gmail.com>
To: tiff@lists.maptools.org
Subject: [Tiff] Problems reading TIFF with TIFFReadEncodedStrip
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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="===============0023368894=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0023368894==
Content-Type: multipart/alternative; boundary=e89a8f839d33dfa6f804c518942e

--e89a8f839d33dfa6f804c518942e
Content-Type: text/plain; charset=ISO-8859-1

Hello,


       I have developed a read/write TIFF image Strip and Tile oriented.
But I have problems reading an image. This image has the following tags:

ImageWidth (1 Short): 1500
ImageLength (1 Short): 6000
BitsPerSample (1 Short): 32

Compression (1 Short): Uncompressed
Photometric (1 Short): MinIsBlack
StripOffsets (35 Long): 8, 6008, 12008, ...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Short): 1
StripByteCounts (35 Long): 6000, 6000, 6000,...
XResolution (1 Rational): 0
YResolution (1 Rational): 0
ResolutionUnit (1 Short): Centimeter

        As can be seen, the TIFF tags does not show any special issue,
only the 32bits per sample. The problem is when trying to read this
image, I supposed that the function TIFFStripSize will return a size
of 1500 (ImageWidth*RowsPerStrip*SamplesPerPixel) but it returns 6000,
and I do not understand why it is obtaining this value.

    If I read this image using TIFFReadEncodedStrip function and then
write it using TIFFWriteEncodedStrip there is no problem in the output
image. But, If I try to plot the obtained buffer after read the whole
image, the plot is very strange, it seems that the data in coded or
something similar.

    Can anybody help me in this issue?

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

Hello,<div><br></div><div><br></div><div>=A0 =A0 =A0 =A0I have developed <f=
ont face=3D"arial, helvetica, sans-serif">a read/write TIFF im</font>age St=
rip and Tile oriented. But I have problems reading an image. This image has=
 the following tags:=A0</div>
<div><br></div><div><span style=3D"background-color:rgb(255,255,255)">Image=
Width (1 Short): 1500</span></div><div><span style=3D"font-family:arial,hel=
vetica,sans-serif;background-color:rgb(255,255,255)">ImageLength (1 Short):=
 6000</span></div>
<div><span style=3D"font-family:arial,helvetica,sans-serif;background-color=
:rgb(255,255,255)">BitsPerSample (1 Short): 32</span></div><pre style=3D"ba=
ckground-color:rgb(255,255,255)"><font face=3D"arial, helvetica, sans-serif=
">Compression (1 Short): Uncompressed
Photometric (1 Short): MinIsBlack
StripOffsets (35 Long): 8, 6008, 12008, ...
SamplesPerPixel (1 Short): 1
RowsPerStrip (1 Short): 1
StripByteCounts (35 Long): 6000, 6000, 6000,...
XResolution (1 Rational): 0
YResolution (1 Rational): 0
ResolutionUnit (1 Short): Centimeter</font></pre><pre style=3D"background-c=
olor:rgb(255,255,255)"><font face=3D"arial, helvetica, sans-serif">   </fon=
t></pre><pre style=3D"background-color:rgb(255,255,255)"><font face=3D"aria=
l, helvetica, sans-serif">     As can be seen, the TIFF tags does not show =
any special issue, only the 32bits per sample. The problem is when trying t=
o read this image, I supposed that the function TIFFStripSize will return a=
 size of 1500 (ImageWidth*</font><span style=3D"font-family:arial,helvetica=
,sans-serif">RowsPerStrip*</span><span style=3D"font-family:arial,helvetica=
,sans-serif">SamplesPerPixel</span><span style=3D"font-family:arial,helveti=
ca,sans-serif">) but it returns 6000, and I do not understand why it is obt=
aining this value. </span></pre>
<pre style=3D"background-color:rgb(255,255,255)"><span style=3D"font-family=
:arial,helvetica,sans-serif">    If I read this image using TIFFReadEncoded=
Strip function and then write it using TIFFWriteEncodedStrip there is no pr=
oblem in the output image. But, If I try to plot the=A0obtained buffer afte=
r read the whole image, </span><span style=3D"font-family:arial,helvetica,s=
ans-serif">the plot is very strange, it seems that the data in coded or som=
ething similar.=A0</span></pre>
<pre style=3D"background-color:rgb(255,255,255)"><span style=3D"font-family=
:arial,helvetica,sans-serif">    Can anybody help me in this issue?  </span=
></pre><pre style=3D"background-color:rgb(255,255,255)"><span style=3D"font=
-family:arial,helvetica,sans-serif">    </span></pre>
<pre style=3D"background-color:rgb(255,255,255)"><font face=3D"arial, helve=
tica, sans-serif">      </font></pre>

--e89a8f839d33dfa6f804c518942e--

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