Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.b-one.net (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id 3BA5140013D
	for <info@awaresystems.be>; Mon, 20 Jul 2009 19:40:56 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.b-one.net (Postfix) with ESMTP id A0E50C2284C
	for <info@awaresystems.be>; Mon, 20 Jul 2009 19:40:53 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id CB0631D18B144;
	Mon, 20 Jul 2009 12:40:02 -0500 (EST)
Received: from akimn.com (unknown [66.103.177.161])
	by lists.maptools.org (Postfix) with ESMTP id E970A1D18E72B
	for <tiff@lists.maptools.org>; Mon, 20 Jul 2009 12:38:36 -0500 (EST)
Content-class: urn:content-classes:message
MIME-Version: 1.0
Date: Mon, 20 Jul 2009 12:38:18 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Message-ID: <37CE7D132DD3F449B03793282D14D4C22FF7A1@AKI-SERVER.AKI.local>
In-Reply-To: <A478CDAB43B6A24184D73AD767FB5AB4606C591B12@GVW1096EXB.americas.hpqcorp.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: reading an 8 bit image
Thread-Index: AcoGIlk9Lr4MlDVgTPKV4COGlx+zgwA4XTjAAAA6RiAAk2g5cAAAGzKQ
References: <37CE7D132DD3F449B03793282D14D4C22FF737@AKI-SERVER.AKI.local>
	<A478CDAB43B6A24184D73AD767FB5AB4606C59143A@GVW1096EXB.americas.hpqcorp.net>
	<37CE7D132DD3F449B03793282D14D4C22FF77A@AKI-SERVER.AKI.local>
	<A478CDAB43B6A24184D73AD767FB5AB4606C591B12@GVW1096EXB.americas.hpqcorp.net>
From: "Joe Tracy" <JTracy@akimn.com>
To: "Persons, Michael" <michael.persons@hp.com>,
	<tiff@lists.maptools.org>
Subject: Re: [Tiff] reading an 8 bit image
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: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Yes.  Mine bounced back too.. next time I will put the code in as text, not=
 bitmaps..

Anyway, it is working fine.

Thanks,
joe


-----Original Message-----
From: Persons, Michael [mailto:michael.persons@hp.com] =

Sent: Monday, July 20, 2009 10:56 AM
To: Joe Tracy; tiff@lists.maptools.org
Subject: RE: reading an 8 bit image

Yes without analyzing it completely (i.e. there may be even more issues), t=
here is also a problem with adjusting for the current line (j*w).
When offsetting into the "raster" buffer to correctly compensate for which =
line / row of the image is being processed, the j*w would need to change to=
 j*w*4 (i.e. current line* width * bytesPerPixel)

note:
(My original post bounced because it was too large so I changed to plain te=
xt and the pictures below were lost)

-michael

________________________________________
From: Joe Tracy [mailto:JTracy@akimn.com] =

Sent: Friday, July 17, 2009 11:16 AM
To: Persons, Michael; tiff@lists.maptools.org
Subject: RE: reading an 8 bit image

Thank you Michael.=A0 The was the answer.=A0 However it did not work in the=
 code I was using.=A0 I had to emulate my GDI code, then change samples to =
4.

This is the original code I was using:


Changing the ptr increment to 4 did not work.

This is the GDI code that works fine, samples (from the tiff header) =3D 1:



So I changed the code I originally sent to emulate this pointer iteration (=
and increment the raster pointer directly), but had to ignore the samples f=
rom the tif header and set it to 4.=A0 then it works fine.



Thanks,
Joe
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
