K70 Color Keying

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K70 Color Keying

1,520件の閲覧回数
ant1882
Contributor II

Hello

I am trying to use the color keying feature of the K70 LCDC without success. I am using the tower system, I can display things on the LCD (our own) without any issues, using the graphics window and background.

What I have is a graphics window of 100 lines with a group of red lines in the middle, from my understanding if I enable color keying correctly these red lines should become transparent... is this correct? If so then below is the code I am using to enable color keying:

//  set LCD graphic window control

  LCDC_LGWCR =

    LCDC_LGWCR_GWAV(0x9f)   | // alpha-transparent value (0xFF is opaque)

    LCDC_LGWCR_GWE_MASK     |

    LCDC_LGWCR_GWCKE_MASK   |   // Colour Keying enable

    LCDC_LGWCR_GWCKR(0x3f)  |     // Red colour keying

    LCDC_LGWCR_GWCKG(0)     |

    LCDC_LGWCR_GWCKB(0);

If anybody has used color keying successfully I would appreciate any help or ideas as to why mine doesn't. Apologies if I have missed any information that may help.

Best Regards

Anthony

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,342件の閲覧回数
apanecatl
Senior Contributor II

If you want to remove the Red component and display the Green and Blue components you would have to set the color keying as follows:


               Red color keying                       Green color keying                   Blue color keying

    LCDC_LGWCR_GWCKR(0x00)  | LCDC_LGWCR_GWCKG(0xFF)  |  LCDC_LGWCR_GWCKB(0xFF);



a 0x00 in any of the color keying fields will render it completely transparent whilst a 0xFF value will render it completely visible.

1,342件の閲覧回数
ant1882
Contributor II

Thanks for the explanation.

Unfortunately it still doesn't work for me, so I must be missing something else. I shall have another look when I get chance.

0 件の賞賛
返信

1,342件の閲覧回数
apanecatl
Senior Contributor II

When you enable color keying all the selected color component in the graphic window will become transparent, not only those pixels with a 100% red color component.