Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas030.isp.belgacom.be (localhost [127.0.0.1])
        by inav011.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id j8CHI4uh006839
        for <joris.at.lebbeke@skynet.be>; Mon, 12 Sep 2005 19:18:04 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx001.isp.belgacom.be (inmx001.isp.belgacom.be [195.238.2.1])
        by inas030.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id j8CHHuAd002086
        for <joris.at.lebbeke@skynet.be>; Mon, 12 Sep 2005 19:17:56 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx001.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j8CHHqDO004756
        for <joris.at.lebbeke@skynet.be>; Mon, 12 Sep 2005 19:17:52 +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 j8CHCAg5003052;
	Mon, 12 Sep 2005 13:13:02 -0400
Received: from povmail.POINTOFVIEW.COM (207.155.245.125.ptr.us.xo.net
	[207.155.245.125])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j8CHC7WQ003049
	for <tiff@lists.maptools.org>; Mon, 12 Sep 2005 13:12:08 -0400
content-class: urn:content-classes:message
MIME-Version: 1.0
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Date: Mon, 12 Sep 2005 10:12:06 -0700
Message-ID: <9FD334F55BC56E4C9BFA5CABC049EB88145E5B@povmail.pointofview.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: extracting 16-bit grayscale from photoshop
Thread-Index: AcW3vRoY2ePq/5aeS5yBe14JzIwsOw==
From: "Hoan Chau" <Hoan.Chau@pointofview.com>
To: <tiff@lists.maptools.org>
Subject: [Tiff] extracting 16-bit grayscale from photoshop
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="===============1948065518=="
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00000c04
X-MSP-STORE: Mon, 12 Sep 2005 19:18:12 +0200
Status:   

This is a multi-part message in MIME format.

--===============1948065518==
content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C5B7BD.1A604157"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C5B7BD.1A604157
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I have a 16-bit grayscale image that when read by TiffReadScanline
identifies the first byte for the first pixel
as 0x14 =3D 20; and the second byte as 0x5e =3D 94.  Compared to another
program called PolyView (just to check my sanity),=20
the first byte is indeed a value of 20.  However, when i go to view the
image in Photoshop, I have completely different information
displayed: pixel value =3D 29 =3D r =3D g =3D b.  Furthermore, if I view =
it as a
16-bit value it is 3,726. =20
=20
Thus, I don't understand how the data can be interpreted one way in
Photoshop and in another way by TiffReadScanline.
=20
Is there a tag/mask that Photoshop uses which converts each two bytes
per pixel to its 16-bit value (e.g. 0x145e to 3,726)?
=20
Hoan
=20
=20
=20

------_=_NextPart_001_01C5B7BD.1A604157
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial =
size=3D2>I&nbsp;have a 16-bit=20
grayscale image that when read by TiffReadScanline identifies the first =
byte for=20
the first pixel</FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial size=3D2>as =
0x14 =3D 20; and=20
the second byte as 0x5e =3D 94.&nbsp; Compared to another program called =
PolyView=20
(just to check my sanity), </FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial size=3D2>the =
first byte=20
</FONT></SPAN><SPAN class=3D955435016-12092005><FONT face=3DArial =
size=3D2>is indeed a=20
value of 20.&nbsp; However, when i go to view the image in Photoshop, I =
have=20
completely different information</FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial =
size=3D2>displayed: pixel=20
value =3D 29 =3D r =3D g =3D b.&nbsp; Furthermore, if I&nbsp;view =
it&nbsp;as&nbsp;a=20
16-bit value it is 3,726.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial size=3D2>Thus, =
I don't=20
understand how the data can be interpreted one way in Photoshop and in =
another=20
way by TiffReadScanline.</FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial size=3D2>Is =
there a tag/mask=20
that Photoshop uses which converts&nbsp;each two bytes per=20
pixel&nbsp;to&nbsp;its 16-bit value (e.g.&nbsp;0x145e to=20
3,726)?</FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2>Hoan</FONT></SPAN></DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D955435016-12092005><FONT face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C5B7BD.1A604157--

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