Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - the LCD color is not as config: (6 Items)
   
the LCD color is not as config  
in my test file, the layer format is GF_FORMAT_PACK_RGB565 ,code as below,
x=400; 
y=240;
gf_context_set_fgcolor( context, 0x0000FF);//blue 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0x00FF00);//? 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0xFF0000);//green 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1; 
gf_context_set_fgcolor(context,0xFFFFFF);//while
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor(context,0x000000);//black
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 

in gf.h file:
/* Generic color represenation. Unless otherwise noted, this type is packed
 * native endian with the following components:
 * - Blue; 8-bit value occupying byte 0 (LSB)
 * - Green; 8-bit value occupying byte 1
 * - Red; 8-bit value occupying byte 2
 * - Alpha; 8-bit value occupying byte 3 (MSB). 255 = opaque, 0 = transparent */
byte0(0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......which is not right 
coreesponding to defination of gf.h, what is the matter? thansk
Re: the LCD color is not as config  
the surface format is PKLE_RGB565
RE: the LCD color is not as config  

The GF code below looks ok for color.    Are you able to do any tests outside of GF to validate your hardware platform? 
 It may be you have a different color mapping and need to adjust your display controller settings to map the colors 
accordingly.

-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 24, 2009 1:39 AM
To: advanced-graphics
Subject: the LCD color is not as config

in my test file, the layer format is GF_FORMAT_PACK_RGB565 ,code as below,
x=400; 
y=240;
gf_context_set_fgcolor( context, 0x0000FF);//blue 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0x00FF00);//? 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0xFF0000);//green 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1; 
gf_context_set_fgcolor(context,0xFFFFFF);//while
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor(context,0x000000);//black
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 

in gf.h file:
/* Generic color represenation. Unless otherwise noted, this type is packed
 * native endian with the following components:
 * - Blue; 8-bit value occupying byte 0 (LSB)
 * - Green; 8-bit value occupying byte 1
 * - Red; 8-bit value occupying byte 2
 * - Alpha; 8-bit value occupying byte 3 (MSB). 255 = opaque, 0 = transparent */
byte0(0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......which is not right 
coreesponding to defination of gf.h, what is the matter? thansk



_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post34484
Re: RE: the LCD color is not as config  
now in the display.conf, pixel_format=rgb565 ;while in imx31.conf, the dispalay output pixel format ofmt = 18, the the 
right color output.
 I can not understand the config, if rgb565, the ofmt should be 16, but this configure made wrong color output, byte0(
0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......


2009-07-28 



mygong 



发件人: Michael Van Reenen 
发送时间: 2009-07-28  06:07:32 
收件人: advanced-graphics 
抄送: 
主题: RE: the LCD color is not as config 
 
The GF code below looks ok for color.    Are you able to do any tests outside of GF to validate your hardware platform? 
 It may be you have a different color mapping and need to adjust your display controller settings to map the colors 
accordingly.
-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 24, 2009 1:39 AM
To: advanced-graphics
Subject: the LCD color is not as config
in my test file, the layer format is GF_FORMAT_PACK_RGB565 ,code as below,
x=400; 
y=240;
gf_context_set_fgcolor( context, 0x0000FF);//blue 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0x00FF00);//? 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0xFF0000);//green 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1; 
gf_context_set_fgcolor(context,0xFFFFFF);//while
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor(context,0x000000);//black
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
in gf.h file:
/* Generic color represenation. Unless otherwise noted, this type is packed
 * native endian with the following components:
 * - Blue; 8-bit value occupying byte 0 (LSB)
 * - Green; 8-bit value occupying byte 1
 * - Red; 8-bit value occupying byte 2
 * - Alpha; 8-bit value occupying byte 3 (MSB). 255 = opaque, 0 = transparent */
byte0(0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......which is not right 
coreesponding to defination of gf.h, what is the matter? thansk
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34484
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34676
RE: RE: the LCD color is not as config  
The ofmt option is the format of the iMX31 output to the physical LCD.  In your case it is 18 bits.   This is 
independent of the pixel format selected in display.conf.  The iMX31 will convert the framebuffer data to the required 
output format for the LCD.



-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 27, 2009 11:16 PM
To: advanced-graphics
Subject: Re: RE: the LCD color is not as config

now in the display.conf, pixel_format=rgb565 ;while in imx31.conf, the dispalay output pixel format ofmt = 18, the the 
right color output.
 I can not understand the config, if rgb565, the ofmt should be 16, but this configure made wrong color output, byte0(
0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......


2009-07-28 



mygong 



发件人: Michael Van Reenen 
发送时间: 2009-07-28  06:07:32 
收件人: advanced-graphics 
抄送: 
主题: RE: the LCD color is not as config 
 
The GF code below looks ok for color.    Are you able to do any tests outside of GF to validate your hardware platform? 
 It may be you have a different color mapping and need to adjust your display controller settings to map the colors 
accordingly.
-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 24, 2009 1:39 AM
To: advanced-graphics
Subject: the LCD color is not as config
in my test file, the layer format is GF_FORMAT_PACK_RGB565 ,code as below,
x=400; 
y=240;
gf_context_set_fgcolor( context, 0x0000FF);//blue 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0x00FF00);//? 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0xFF0000);//green 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1; 
gf_context_set_fgcolor(context,0xFFFFFF);//while
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor(context,0x000000);//black
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
in gf.h file:
/* Generic color represenation. Unless otherwise noted, this type is packed
 * native endian with the following components:
 * - Blue; 8-bit value occupying byte 0 (LSB)
 * - Green; 8-bit value occupying byte 1
 * - Red; 8-bit value occupying byte 2
 * - Alpha; 8-bit value occupying byte 3 (MSB). 255 = opaque, 0 = transparent */
byte0(0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......which is not right 
coreesponding to defination of gf.h, what is the matter? thansk
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34484
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34676




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post34681
Re: RE: RE: the LCD color is not as config  
thanks!


2009-07-29 



mygong 



发件人: Michael Van Reenen 
发送时间: 2009-07-28  19:48:26 
收件人: advanced-graphics 
抄送: 
主题: RE: RE: the LCD color is not as config 
 
The ofmt option is the format of the iMX31 output to the physical LCD.  In your case it is 18 bits.   This is 
independent of the pixel format selected in display.conf.  The iMX31 will convert the framebuffer data to the required 
output format for the LCD.
-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 27, 2009 11:16 PM
To: advanced-graphics
Subject: Re: RE: the LCD color is not as config
now in the display.conf, pixel_format=rgb565 ;while in imx31.conf, the dispalay output pixel format ofmt = 18, the the 
right color output.
 I can not understand the config, if rgb565, the ofmt should be 16, but this configure made wrong color output, byte0(
0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......
2009-07-28 
mygong 
发件人: Michael Van Reenen 
发送时间: 2009-07-28  06:07:32 
收件人: advanced-graphics 
抄送: 
主题: RE: the LCD color is not as config 

The GF code below looks ok for color.    Are you able to do any tests outside of GF to validate your hardware platform? 
 It may be you have a different color mapping and need to adjust your display controller settings to map the colors 
accordingly.
-----Original Message-----
From: gong mingyu [mailto:community-noreply@qnx.com] 
Sent: July 24, 2009 1:39 AM
To: advanced-graphics
Subject: the LCD color is not as config
in my test file, the layer format is GF_FORMAT_PACK_RGB565 ,code as below,
x=400; 
y=240;
gf_context_set_fgcolor( context, 0x0000FF);//blue 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0x00FF00);//? 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor( context, 0xFF0000);//green 
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1; 
gf_context_set_fgcolor(context,0xFFFFFF);//while
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
x>>=1;
y>>=1;
gf_context_set_fgcolor(context,0x000000);//black
gf_draw_rect(context,(width>>1)-1-x,(height>>1)-1-y,(width>>1)-1+x,(height>>1)-1+y); 
in gf.h file:
/* Generic color represenation. Unless otherwise noted, this type is packed
 * native endian with the following components:
 * - Blue; 8-bit value occupying byte 0 (LSB)
 * - Green; 8-bit value occupying byte 1
 * - Red; 8-bit value occupying byte 2
 * - Alpha; 8-bit value occupying byte 3 (MSB). 255 = opaque, 0 = transparent */
byte0(0x0000ff) is blue, byte1(0x00ff00) is cambridge blue,byte2(0xff0000) is green......which is not right 
coreesponding to defination of gf.h, what is the matter? thansk
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34484
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34676
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34681
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post34695