Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Mon Jan 21 02:59:17 2002
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id FAA19369;
	Mon, 21 Jan 2002 05:50:19 -0500
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Mon, 21 Jan 2002 05:48:27 -0500
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id FAA19156
	for tiff-outgoing; Mon, 21 Jan 2002 05:48:26 -0500
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from hotmail.com (f202.law8.hotmail.com [216.33.241.202])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id FAA19130
	for <tiff@olympiakos.com>; Mon, 21 Jan 2002 05:48:23 -0500
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
	 Mon, 21 Jan 2002 02:47:51 -0800
Received: from 203.116.61.132 by lw8fd.law8.hotmail.msn.com with HTTP;
	Mon, 21 Jan 2002 10:47:51 GMT
X-Originating-IP: [203.116.61.132]
From: "Bad Badtz" <badtzbad@hotmail.com>
To: tiff@olympiakos.com
Subject: Re: How to interpret 16-bit GrayScale image?
Date: Mon, 21 Jan 2002 18:47:51 +0800
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <F202cGP1GUqEhUW7tN00002292e@hotmail.com>
X-OriginalArrivalTime: 21 Jan 2002 10:47:51.0294 (UTC) FILETIME=[12C041E0:01C1A269]
Sender: owner-tiff@olympiakos.com
Precedence: bulk
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by gate7.olympiakos.com id FAA19369
Status: RO
Content-Length: 6397
Lines: 210

Hi,

I had constructed a windows bitmap using HBITMAPINFOHEADER and had hoped =
to=20
get an unsigned 16-bit grayscale image. But unfortunately, like what Mart=
i=20
Maria and Peter had said, I got a colored image instead. I realized that=20
once the bitCount is more than 8 bits, the image is taken as RGB image wi=
th=20
no color table.

Thanks Marti for your help on converting the 16-bit grayscale image to 8=20
bit, but as I can't afford to lose the information, i might need to spend=
=20
more effort and convert the 16-bit to 24-bit instead.

A question, does TIFF supports both unsigned 16-bit colored and grayscale=
=20
images?

Thanks!
Nicole

>From: Mart=ED Maria <marti@littlecms.com>
>To: "Bad Badtz" <badtzbad@hotmail.com>, <tiff@olympiakos.com>
>Subject: Re: How to interpret 16-bit GrayScale image?
>Date: Mon, 21 Jan 2002 09:59:26 -0320
>
>Hi,
>
>Oh, well, you have discovered windows bitmaps are very limited
>when trying to store anything but a few formats. A windows bitmap
>cannot store 16 bits, for example. You have two workarounds.
>
>One, ignore completly the windows bitmap stuff, and store the image
>in your own memory block/storage scheme. This is the best solution
>but I'm afraid it requeres a lot of work, since you cannot use GDI
>anymore.
>
>Two, convert 16 to 8 bits. This is going to loose information, but
>you will get compatibility with all GDI functions.
>
>Bitmap does NOT accept grayscale as type, but there is a clean
>trick. Just build the bitmap as a palette one, and then add a palette
>of 256 grays. This palette should be built using a gamma curve, else
>you will get even few grays on display. At this point your bitmap
>will behave as a grayscale of 8 bps. Then convert from 16 bps to
>8 bps by dividing by 257. (sic, 257. NOT 256)
>
>There are other solutions, like to emulate grayscale by using
>close-neutral colors, or use icc profiles to build accurate
>conversion, but these are really complex ways to get only a
>slightly better results.
>
>Hope this helps,
>Marti.
>
>
>----- Original Message -----
>From: "Bad Badtz" <badtzbad@hotmail.com>
>To: <paul.beaty@arch.gatech.edu>; <tiff@olympiakos.com>
>Sent: Sunday, January 20, 2002 11:46 PM
>Subject: RE: How to interpret 16-bit GrayScale image?
>
>
> > Hi,
> >
> > Thanks Paul and Marti Maria for responding to my previous email.
> >
> > >From ur replies, can I say that TIFF does support both unsigned 16-b=
it=20
>RGB
> > and grayscale images?
> >
> > The problem i encountered now is that I need to construct a HBitmap=20
>using
> > the grayscale image data, but instead of getting a grayscale image, I=
 am
> > always getting a colored image. It seems that once the number of bits=
=20
>per
> > pixel is more than 8, it assumes that it is a RGB image. Therefore,=20
>instead
> > of using each image data as an index to the color table (i have=20
>constructed
> > the color table with size 65536), each individual value is taken as a=
=20
>RGB
> > value.
> >
> > Does anyone have a solution to my problem? Would converting the unsig=
ned
> > 16-bit grayscale image to a RGB image works?
> >
> > Please help! Thanks!!!
> >
> >
> >
> > regards,
> > Nicole
> >
> >
> > >From: "Paul Beaty" <paul.beaty@arch.gatech.edu>
> > >To: <tiff@olympiakos.com>, "Bad Badtz" <badtzbad@hotmail.com>
> > >Subject: RE: How to interpret 16-bit GrayScale image?
> > >Date: Wed, 16 Jan 2002 09:52:42 -0500
> > >
> > >Nichole,
> > >
> > >Unsigned 16-bit data means you have the possibility of a total value=
=20
>range
> > >of 65536 (0 - 65535) values. This does not mean they are all being=20
>used.
> > >Typically, when GIS and remote sensing data are stored as unsigned=20
>16-bit,
> > >there is a good reason. This may indicate the values represent=20
>something
> > >other than a simple shade or color. How do you interpret the values.=
...
> > >first, what type of data do you have? DEM, vegetation index, satelli=
te
> > >image, scanned photo, GIS thematic data?
> > >
> > >If file size is an issue, use pack-bit compression to compress the=20
>non-used
> > >values. Note that pack-bit compression is a loss-less compression.
> > >
> > >Good Luck,
> > >
> > >Paul
> > >
> > > > -----Original Message-----
> > > > From: owner-tiff@olympiakos.com [mailto:owner-tiff@olympiakos.com=
]On
> > > > Behalf Of Bad Badtz
> > > > Sent: Wednesday, January 16, 2002 6:07 AM
> > > > To: tiff@olympiakos.com
> > > > Subject: How to interpret 16-bit GrayScale image?
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I have a GeoTIFF image that looks like a grayscale image when vie=
wed
> > >with
> > > > Erdas Imagine. This image has 16 bits per sample and 1 sample per
> > > > pixel. The
> > > > photometric interpretation is 1, meaning that it is a grayscale
> > > > image, and
> > > > this image has no color table.
> > > >
> > > > How do i interpret the pixel values then? Should I construct an
> > > > index table
> > > > with 65536 colors? Are there so many colors? Or can I change the=20
>image
> > >to
> > > > RGB colored instead?
> > > >
> > > > Urgent!! Please help!!! Thanks in advance!!
> > > >
> > > > regards,
> > > > Nicole
> > > >
> > > >
> > > >
> > > > _________________________________________________________________
> > > > Send and receive Hotmail on your mobile device:=20
>http://mobile.msn.com
> > > >
> > > >
> > > > To subscribe or unsubscribe email tiff-request@olympiakos.com
> > > > with subscribe
> > > > or unsubscribe in the email body.  Libtiff home page:
> > > > http://www.libtiff.org
> > >
> >
> >
> >
> >
> > _________________________________________________________________
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx
> >
> >
> > To subscribe or unsubscribe email tiff-request@olympiakos.com with=20
>subscribe
> > or unsubscribe in the email body.  Libtiff home page:=20
>http://www.libtiff.org
> >
> >
>
>
>To subscribe or unsubscribe email tiff-request@olympiakos.com with=20
>subscribe
>or unsubscribe in the email body.  Libtiff home page:=20
>http://www.libtiff.org




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:=20
http://photos.msn.com/support/worldwide.aspx


To subscribe or unsubscribe email tiff-request@olympiakos.com with subscr=
ibe
or unsubscribe in the email body.  Libtiff home page: http://www.libtiff.=
org

