nanogui: Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
Subject:
Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
From:
"Thomas Malkus" ####@####.####
Date:
6 Jan 2008 16:07:08 -0000
Message-Id: <00c301c8507e$2e059bc0$8a10d340$@de>
Hello,
I have a problem to display the right colors. I am use a system
with Linux on a ARM AT91RM9200 controller with a 320x240 pixel
display with 8bpp (256 Colors), kernel 2.6.12 and framebuffer.
All the nanox demos have the correct colors, display of text
and images are ok. With fltk-1.1.7 I have the problem, that
the colors are totally wrong. This I could solve if I had changed
the display info in OpenDis.c of nxlib. I set the rmask, gmask and
bmask to fixed values:
sinfo.rmask = 0xe0
sinfo.gmask = 0x1c
sinfo.bmask = 0x03
sinfo.bpp = 8
Now the colors for text, widgets and others are ok. But the colors
for images, i.e. gif, bmp and xpm where wrong if I use the fltk-1.17
functions to display a image:
box = new Fl_Box(0,0,200,100);
xpm = new Fl_XPM_Image("/data/fonts/logo.xpm");
box->image(xpm);
I created a xpm image (the same happens with gif and bmp) with
TheGimp, three color bars using only red (0xff), green (0xff)
and blue (0xff). Blue is nearly ok(to bright), but green is
violett and red is green but to bright, too. Also the image is
shifted diagonally, the left top corner is right, but the
left bottom corner is nearly the right bottom corner.
If I start a second process with nxview to display the same image
(as gif or bmp) it will be displayed without errors, but all the
colors of the underlying fltk-1.1.7 program where changed until
I start it new.
I think the problem is nxlib. But where I could have a look to
solve this? What could I try?
Kind regards, Tom