Bad contrast on XDRIVER24

Justin Hickey jhickey at impact1.hpcc.nectec.or.th
Fri Aug 20 11:43:16 EDT 1999


Hello all

Some further information regarding this problem

On Aug 20,  3:20pm, Phisan Santitamnont wrote:
> Subject: Bad contrast on XDRIVER24
> Dear GRASSers,
>
> i have trouble with GRASS monitor when i
> display a low-contrast grey image.
>
> On Linux it gives only few color indexes which is
> not enogh for this kind of  poor-contrast images.
>
> i try to switch to 'float color mode'
> and it is not possible on my LINUX
> i got message
> 'Sorry, floating color table not available on this device'
>
> I looked at
> $GRASSHOME/src421/src/display/devices/XDRIVER_24/lib/color_supp.c
>
> and saw
>
> #define MAX_STD_COLORS 15

We also get this message on at least 4 of our Linux boxes. But we noticed that
when we start a monitor through d.mon we get the following message:

got a TrueColor (Read-Only!) Visual

The read-only may explain why the float color mode does not work. Looking at
src/display/devices/XDRIVER_24/XDRIVER24/Clr_table.c, function
Color_table_float() has the following code at the top of the function

  if (truecolor) {
    return -1;
  } else {

I believe the return(-1) triggers the 'Sorry, floating color table not
available on this device' error message. I partially traced it but I'm not 100%
certain.

Now in the function reset_color() located just above the Color_table_float
function there is this code at the top of the function

    if (truecolor) {
      /*the color table in truecolor is fixed. */
    } else {

What I am wondering is whether the return(-1) can be commented out since
similar code in the same file indicates that "the color table in truecolor is
fixed". I really am not sure if commenting out this code will truly solve the
problem since other problems could appear. Also, Dr. Phisan's findings may also
solve the problem.

Does anyone with knowledge of this code know the correct way to fix this
problem?

Thank you for your time and effort in this matter.

-- 
Sincerely,

Jazzman (a.k.a. Justin Hickey)  e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do.  ---Anonymous

Jazz and Trek Rule!!!
==================================================================



More information about the grass-user mailing list