nanogui: Thread: Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7


[<<] [<] Page 1 of 1 [>] [>>]
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




Subject: Re: [nanogui] Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
From: Matteo Facchinetti ####@####.####
Date: 7 Jan 2008 09:48:07 -0000
Message-Id: <4781F54B.9070805@sirius-es.it>

Hi Thomas,

In my system I'm working with the same software (fltk - nxlib - nano-x) 
and I think that I've encountered the same problem.
I'm working in a 256 color with Palette video card.
Your graphic card works with a hw palette or in TrueColor?

I need this info for give you help.

> Also the image is 
> shifted diagonally, the left top corner is right, but the
> left bottom corner is nearly the right bottom corner.
>
>   
Image size must be word aligned (long).


Regards,

Matteo Facchinetti





Thomas Malkus wrote:
> 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
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>   

Subject: RE: [nanogui] Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
From: "Thomas Malkus" ####@####.####
Date: 7 Jan 2008 20:33:30 -0000
Message-Id: <000601c8516c$8381aa50$8a84fef0$@de>

Hi Matteo,

 

> I'm working in a 256 color with Palette video card.

> Your graphic card works with a hw palette or in TrueColor?

> 

> I need this info for give you help.

 

Thank you for help!

 

That's a problem, I don't know the difference. I am not the

manufacturer of that hardware and I have not much knowledge

about graphic. I could ask the manufacturer (http://www.taskit.de,

Portux Panel PC), but they don't work with FLTK and nxlib.

 

The system has a Epson S1D13706 graphic controller. The driver is

the framebuffer driver for this controller from Epson found in the

path <linux_kernel>/drivers/video/epson, s1d13706.h, s1d13xxxfb*.*

 

Where I could find some information about the palette? If I change

the value of SCREEN_PIXTYPE I can't see any difference. Normally I

use as explained for framebuffer MWPF_TRUECOLOR0888. The output of

fbset is:

 

root@ag1:# fbset -i

 

mode "320x240-2172"

    # D: 166.778 MHz, H: 521.181 kHz, V: 2171.587 Hz

    geometry 320 240 320 240 8

    timings 5996 0 0 0 0 0 0

    rgba 8/0,8/0,8/0,0/0

endmode

 

Frame buffer device information:

    Name        : s1d13xxx

    Address     : 0x30200000

    Size        : 81920

    Type        : PACKED PIXELS

    Visual      : MONO01

    XPanStep    : 0

    YPanStep    : 0

    YWrapStep   : 0

    LineLength  : 320

    MMIO Address: 0x30000000

    MMIO Size   : 256

    Accelerator : No

root@ag1:#

 

What is the meaning of "Visual: MONO01"?

 

> > shifted diagonally, the left top corner is right, but the

> > left bottom corner is nearly the right bottom corner.

> >

> Image size must be word aligned (long).

 

Okay, I will try that. But this will not correct the colors ;-).

Hope you have an idea.

 

Regards, 

Tom

Subject: Re: [nanogui] Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
From: Matteo Facchinetti ####@####.####
Date: 8 Jan 2008 12:55:56 -0000
Message-Id: <478372DF.3070405@sirius-es.it>

Hi Thomas,

>  
>
> Where I could find some information about the palette? 
A way is to open fb driver code in your kernel:
in s1d13xxxfb_set_par() function there's a switch that  initialize the 
hw of your video card.
In case of 8bpp, this card works in "pseudo color"; this mean that it 
use a hw palette.

> Normally I
>
> use as explained for framebuffer MWPF_TRUECOLOR0888. 
OK, because nano-x when works with framebuffer ask to kernel the hw 
config of your video card.
In this case, your videocard works in FB_VISUAL_PSEUDOCOLOR and then 
set-up the 256 system color palette.


The problem is that Fltk+nxlib+nanox system works only in TrueColor 
because in
nxlib it's not implemented the possibility to convert the
palette index <=> color value
for images.

For solve this problem I make a "brutal" hack....
1 - I compile FTLK with enable USE_COLORMAP in config.h
2 - I apply a patch that force  FLTK to pass its internal index palette 
to nano-x.
3 - I replace nano-x system palette with FLTK palette applying an other 
patch.

The result is that nano-x now works only with FLTK but Image colors are 
good.

This isn't a right solution of the problem... but it works :-)

Is there anyone that can give me a feedback to suggest a better way?
or help me to develop the part needed for give the solution for this 
problem?
I think that this feauture can be interesting for the project.

In attachment there are all patches to apply.

Regards,
Matteo Facchinetti




[Content type text/x-patch not shown. Download]

[Content type text/x-patch not shown. Download]

[Content type text/x-patch not shown. Download]
Subject: Re: [nanogui] Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
From: Malkus Thomas ####@####.####
Date: 10 Jan 2008 15:43:01 -0000
Message-Id: <1972699755.4901199979767496.JavaMail.open-xchange@oxgw00.kundenserver.de>

Hi Matteo,

Matteo Facchinetti ####@####.#### hat am 8. Januar 2008 um 13:55 geschrieben:

> The result is that nano-x now works only with FLTK but Image colors are 
> good.
> 
> This isn't a right solution of the problem... but it works :-)

It works fine, thank you very much for the patch. I use only FLTK without
nanowm so there is no problem.

Do you know a tool to do a screenshot from framebuffer (for ARM)? I tried 
fbshot and fbsnap but both have always a segmentation fault. Otherwise I
must debug that tools to find the problem.

Kind regards and thank you,
Tom
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.