summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-22 15:58:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-22 15:58:39 +0100
commiteb394c68f165a15d29d1b43bc2590ed42c39574b (patch)
tree107e278565616d1de497b57e0843a80618220573 /osd.c
parent27aaf4fc06d93885ae34e4a2d5c7086185f84bcd (diff)
downloadvdr-eb394c68f165a15d29d1b43bc2590ed42c39574b.tar.gz
vdr-eb394c68f165a15d29d1b43bc2590ed42c39574b.tar.bz2
cPalette::ClosestColor() now treats fully transparent colors as "equal"; improved cDvbSpuBitmap::getMinBpp() (cont'd)
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/osd.c b/osd.c
index 0bc80d37..cc603375 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 2.8 2010/01/17 13:43:02 kls Exp $
+ * $Id: osd.c 2.9 2010/01/22 15:58:39 kls Exp $
*/
#include "osd.h"
@@ -151,7 +151,7 @@ int cPalette::ClosestColor(tColor Color, int MaxDiff) const
int G2 = (color[i] & 0x0000FF00) >> 8;
int B2 = (color[i] & 0x000000FF);
int diff = 0;
- if (A1 && A2) // fully transparent colors are considered equal
+ if (A1 || A2) // fully transparent colors are considered equal
diff = (abs(A1 - A2) << 1) + (abs(R1 - R2) << 1) + (abs(G1 - G2) << 1) + (abs(B1 - B2) << 1);
if (diff < d) {
d = diff;