summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-03-24 16:24:53 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-03-24 16:24:53 +0100
commitfd71413b656818f210c7ae62835015f0bc40d4ee (patch)
treebdedad57a15e626fdbeee6f0e8704c66d94c264a /modules
parent0f3c77126b3512d3020ded2a7e72e79faffe1cc7 (diff)
vidinfo: check for values greater than 16 when drawing overlay
Diffstat (limited to 'modules')
-rw-r--r--modules/vidinfo/panel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/vidinfo/panel.c b/modules/vidinfo/panel.c
index 70558f7..93c475b 100644
--- a/modules/vidinfo/panel.c
+++ b/modules/vidinfo/panel.c
@@ -141,7 +141,8 @@ static void overlay(struct vidframe *dst, unsigned yoffs, struct vidframe *src)
for (x=0; x<src->size.w; x++) {
- if (psrc[x] > 127)
+ /* copy the luma component if visible */
+ if (psrc[x] > 16)
pdst[x] = psrc[x];
}
@@ -182,7 +183,7 @@ static int draw_text(struct panel *panel, struct vidframe *frame)
cairo_set_line_width (cr, 0.6);
cairo_stroke (cr);
- vidframe_init_buf(&f, VID_FMT_ARGB, &panel->size_text,
+ vidframe_init_buf(&f, VID_FMT_RGB32, &panel->size_text,
cairo_image_surface_get_data(panel->surface));
err = vidframe_alloc(&f2, frame->fmt, &panel->size_text);