[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: netCDF construct for 24-bit RGB?
- Subject: Re: netCDF construct for 24-bit RGB?
- Date: Tue, 01 Mar 2005 12:55:35 -0700
>To: Russ Rew <address@hidden>, Ed Hartnett <address@hidden>
>From: Lou Estey <address@hidden>
>Subject: Re: 20050217: netCDF construct for 24-bit RGB?
>Organization: UNAVCO
>Keywords: 200502171746.j1HHkLv2015284
Hi Lou,
It looks like your question fell through the cracks. If you send
questions to "address@hidden" they get tracked a little
better and routed to someone who is available, rather than on vacation
or out of town.
> I have another nagging question. Is it possible to
> have a netCDF file hold 24-bit RGB values (8-bit red,
> 8-bit green, 8-bit blue)? In particular, say, a
> lon/lat grid of 24-bit RGB, i.e. an image? (Plus
> it would be better if the storage were sequences
> of RGB byte-triplets.)
There is no 24-bit integer type in netCDF. However, you can define a
byte variable dimensioned like this (I'm using CDL notation):
dimensions:
rgb = 3;
lon = 50;
lat = 60;
variables:
byte image(lon, lat, rgb);
which would waste no space and store RGB values contiguously for each
lon/lat point.
--Russ