git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add demux handling (for decoder and record)
[enigma2.git]
/
lib
/
gdi
/
gpixmap.cpp
diff --git
a/lib/gdi/gpixmap.cpp
b/lib/gdi/gpixmap.cpp
index dbf53838087fa3dc81b836dd6ceeecc33fb0c773..8fc263999b42df517a96fccd0157e8ee60d9e131 100644
(file)
--- a/
lib/gdi/gpixmap.cpp
+++ b/
lib/gdi/gpixmap.cpp
@@
-469,6
+469,10
@@
fail:
gColor gPalette::findColor(const gRGB &rgb) const
{
+ /* grayscale? */
+ if (!data)
+ return (rgb.r + rgb.g + rgb.b) / 3;
+
int difference=1<<30, best_choice=0;
for (int t=0; t<colors; t++)
{