From 721ab679895d5f4a17d0efc4745d342644ee418b Mon Sep 17 00:00:00 2001 From: Richard Pastrick Date: Thu, 7 Jun 2012 14:58:56 -0700 Subject: [PATCH] Fix an issue with baked in overlays not having any alpha, tested with non baked in too and no change there --- overviewer_core/src/overviewer.h | 2 +- overviewer_core/src/primitives/overlay.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index caefdeb..97a5a2e 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -26,7 +26,7 @@ // increment this value if you've made a change to the c extesion // and want to force users to rebuild -#define OVERVIEWER_EXTENSION_VERSION 36 +#define OVERVIEWER_EXTENSION_VERSION 37 /* Python PIL, and numpy headers */ #include diff --git a/overviewer_core/src/primitives/overlay.c b/overviewer_core/src/primitives/overlay.c index 0645a4d..1e02489 100644 --- a/overviewer_core/src/primitives/overlay.c +++ b/overviewer_core/src/primitives/overlay.c @@ -82,8 +82,8 @@ overlay_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyOb /* do the overlay */ if (a > 0) { - alpha_over(state->img, self->white_color, self->facemask_top, state->imgx, state->imgy + increment, 0, 0); - tint_with_mask(state->img, r, g, b, a, self->facemask_top, state->imgx, state->imgy + increment, 0, 0); + alpha_over_full(state->img, self->white_color, self->facemask_top, a/255.f, state->imgx, state->imgy + increment, 0, 0); + tint_with_mask(state->img, r, g, b, 255, self->facemask_top, state->imgx, state->imgy + increment, 0, 0); } }