OSD text with black color showing black rectangles instead of characters

Hi,

I found an issue in OSD rendering when used black color for text/date/time. Please see the images below. How to fix it?

If anyone has solution for this problem, please help me.

Thanks,

Yugandhar

Hi @yugandhar

if you are using 1bpp,

You can change the text color by modifying OSD_TEXT_FONT_CH_COLOR in font structure. The available colours can be found in hal_osd_avdef.h. OSD_TEXT_FONT_CH_COLOR is defined in osd_api.h.

Hi @Pammy ,

The issue is with black color, when used it the displayed OSD is not readable. Your suggestion is for How to change OSD color dynamically?

Have you verified OSD rendering with RGB_Black and getting reproted issue?

Hi @yugandhar

May I know how you set the text color to black? I’d like to follow the same steps to reproduce the result on my end.

When I apply RGB_Black, my output looks like this: (Tried on isp_osd_example default example)

Hi @Pammy ,

I am calling rts_osd_update_info(rts_osd2_type_text, &osd_text); after osd_text.font.ch_color = RGB_Black;

After this call, I am seeing the text as black rectangle blocks as provided in screenshots.

Hi @yugandhar,

I tried your methods on the date text.

I also generated a new font using,
Font: SimSun
Style: Regular
Size: 16

custom_font_1bpp.zip (5.7 KB)

and this is the result i have gotten,

You can use the font I generated and test again. If you generated your own fonts, you can also provide me the header file for testing.

Hi @Pammy ,

Finally I found the root cause of OSD black color issue. The issue is due to block_alpha value in font settings. Alpha values from 0 to 3 and 12 to 15 with black color has reported issue. See the below captured images with black and red color.

Actually I used alpha value 15 in my application and got the issue. Temporarily I can use 11 now to avoid the issue with black color because my app allows user to change OSD color, but it is good to fix and release new version from your side. Hope you will do it soon.

Thanks,

Yugandhar