[Gdal-dev] GDALColorEntry? GDT_CInt16?
Marc A. Lepage
mlepage at pyxisinnovation.com
Wed Mar 8 17:58:32 EST 2006
Thanks Frank!
Just to clarify, the CInt16 type is two signed 16-bit shorts? So each
has a range of -32768 to 32767? Or are they also 0 to 255?
-----Original Message-----
From: Frank Warmerdam [mailto:fwarmerdam at gmail.com] On Behalf Of Frank
Warmerdam
Sent: Wednesday, March 08, 2006 4:56 PM
To: Marc A. Lepage
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] GDALColorEntry? GDT_CInt16?
Marc A. Lepage wrote:
> After reading the docs, I remain confused about the exact types (and
> ranges) of data in a few cases.
>
>
>
> A GDALColorEntry has 4 shorts representing (e.g.) R, G, B, A. Are they
> storing values from 0-255, or 0-32767? (I am assuming they are
signed.)
> When I get a value (say c1 representing red), how should I be reading
> its value?
Marc,
The red, green, blue and alpha values are in the range 0 to 255. A
short type was used because I was concerned that some color models
needed a larger type. However, not having pursued other color models
it hasn't been an issue.
> For complex GDALDataType GDT_CInt16, is that a single 16-bit quantity
> which is to be read as two 8-bit quantities? Or is it two 16-bit
> quantities? Are they signed or unsigned?
GDT_CInt16 consists of two 16bit values, one for the "real" and one
for the "imaginary" component.
Best regards,
--
---------------------------------------+--------------------------------
------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF,
http://osgeo.org
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.2.0/276 - Release Date: 3/7/2006
More information about the Gdal-dev
mailing list