[GRASS5] Cell driver

Hallo,
I still have color problems with the CELL driver. Displaying floating
point maps with the CELL driver produces maps with less colors than
displaying it with the XDRiVER.

You can see this, if you create a map with
r.mapcalc "testmap = row() * 1.0"
in a region with a size of 100x100, which creates a map with 100
colors. Displaying this map with the XDRIVER is no problem. If I use the
CELL driver, I only get about 30 colors. With the PNG driver I get
almost the same result (30 colors).

If I use
r.mapcalc "testmap2 = round(testmap)"
before using the CELL driver, I get all my colors in the CELL map. But
this is obviously not a solution for all cases.

Thanks, Reinhard

From neteler Mon Jun 18 17:26:20 2001
Return-Path: <neteler>
Received: by hgeo02.geog.uni-hannover.de (SMI-8.6/SMI-SVR4)
  id RAA19249; Mon, 18 Jun 2001 17:26:20 +0100
Date: Mon, 18 Jun 2001 17:26:20 +0100
From: Markus Neteler <neteler@geog.uni-hannover.de>
To: "Eric G. Miller" <egm2@jps.net>
Cc: grass5 developers list <grass5@geog.uni-hannover.de>
Message-ID: <20010618172620.A19226@hgeo02.geog.uni-hannover.de>
Mail-Followup-To: "Eric G. Miller" <egm2@jps.net>,
  grass5 developers list <grass5@geog.uni-hannover.de>
References: <Pine.LNX.4.33.0106141604330.10168-100000@salmo.appl-ecosys.com> <20010615105435.B24595@hgeo02.geog.uni-hannover.de> <20010615183811.A1021@calico.local>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20010615183811.A1021@calico.local>; from egm2@jps.net on Fri, Jun 15, 2001 at 06:38:11PM -0700
Subject: [GRASS5] Re: Complete module list for GRASS-5?
Sender: grass5-admin@geog.uni-hannover.de
Errors-To: grass5-admin@geog.uni-hannover.de
X-BeenThere: grass5@geog.uni-hannover.de
X-Mailman-Version: 2.0.5
Precedence: bulk
List-Help: <mailto:grass5-request@geog.uni-hannover.de?subject=help>
List-Post: <mailto:grass5@geog.uni-hannover.de>
List-Subscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=subscribe>
List-Id: GRASS 5 Developers mailing list <grass5.geog.uni-hannover.de>
List-Unsubscribe: <http://www.geog.uni-hannover.de/mailman/listinfo/grass5&gt;,
  <mailto:grass5-request@geog.uni-hannover.de?subject=unsubscribe>
List-Archive: <http://www.geog.uni-hannover.de/pipermail/grass5/&gt;
Status: O
Content-Length: 341
Lines: 14

Hi Eric, hi all,

thanks for taking care of this description script.

So far I have added all missing G_descriptions now according
to your list (probably you want to update if it will stay
permanently).

So all CMD modules should output the "Description" now. Also
some more html pages are added/modified (see web as well).

Cheers

Markus

Reinhard Brunzema wrote:

I still have color problems with the CELL driver. Displaying floating
point maps with the CELL driver produces maps with less colors than
displaying it with the XDRiVER.

1. The CELL and PNG drivers are both limited to 8 bits per pixel (256
colours), but XDRIVER uses the actual depth of the display.

2. displaylib handles colours differently for integer and FP maps.

For FP maps, the net result is that D_set_colors always uses a palette
which evenly samples the RGB colour space. This will result in much
lower colour resolution than a palette which is limited to the map's
colour table.

NB: on a 24-bpp display, D_set_colors only provides 15-bpp resolution
(before this "feature" was added, D_set_colors would attempt to create
a palette containing 16 million colors).

The bottom line is that the problem is inherent in the way that
displaylib handles colours for FP maps. Currently, the only workaround
is to convert maps to integer for display.

--
Glynn Clements <glynn.clements@virgin.net>