added Lcd.py
[enigma2.git] / lib / gdi / gpixmap.cpp
index dbf53838087fa3dc81b836dd6ceeecc33fb0c773..8fc263999b42df517a96fccd0157e8ee60d9e131 100644 (file)
@@ -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++)
        {