summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-05-31 19:56:56 +0000
committerlordjaxom <lordjaxom>2004-05-31 19:56:56 +0000
commitb968a310699595ff139278440ae278aebf112c1f (patch)
tree1944e18832ee3f7420634db6a607aec6c35b76e8 /bitmap.c
parent377ef2b18a6499a1ef0e540a74c4e54317efee85 (diff)
downloadvdr-plugin-text2skin-b968a310699595ff139278440ae278aebf112c1f.tar.gz
vdr-plugin-text2skin-b968a310699595ff139278440ae278aebf112c1f.tar.bz2
- "Background" may be initialized with a color nowv0.0.1-rc1
- fixed channel name/number display - added parameter type (to store logo's filetype) - "Timebar", "Progressbar" and "Volumebar": Background is only drawn if bg is specified - fixed timebar (was running backwards) - renamed "Progressbar" to "Replaybar" for more consistency - renamed "Logo" to "ChannelLogo" - introduced items "Language" (for audio language texts or symbols) and "Image" (foreground images) - adopted SKINS document (SKINS.de is not up-to-date yet) - introduced item "MenuTitle" - introduced items "MenuRed", "MenuGreen", "MenuYellow" and "MenuBlue" - activated message items for display in menu - introcuded parameter "arc" and item "Slope" - fixed possible segfault in Item=Message - implemented items "SymbolReplaying" and "SymbolRadio" - added "text" parameter for all text like Items (explanation follows) - added "SymbolPlay", "SymbolPause", "SymbolFastFwd", "SymbolFastRew", "SymbolSlowFwd", "SymbolSlowRew" items.
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitmap.c b/bitmap.c
index 197060c..f52576a 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -1,8 +1,10 @@
/*
- * $Id: bitmap.c,v 1.1.1.1 2004/05/23 00:08:03 lordjaxom Exp $
+ * $Id: bitmap.c,v 1.3 2004/05/31 19:54:12 lordjaxom Exp $
*/
+#define __STL_CONFIG_H
#include <vdr/tools.h>
+#undef __STL_CONFIG_H
#include "bitmap.h"
#define X_DISPLAY_MISSING
#include <Imlib2.h>
@@ -24,7 +26,7 @@ bool cText2SkinBitmap::Load(const char *Filename) {
if (len > 4) {
if (strcmp(Filename + len - 4, ".xpm") == 0)
return LoadXpm(Filename);
-#ifdef HAVE_IMLIB
+#ifdef HAVE_IMLIB2
else if (strcmp(Filename + len - 4, ".png") == 0)
return LoadPng(Filename);
#endif
@@ -35,7 +37,7 @@ bool cText2SkinBitmap::Load(const char *Filename) {
return false;
}
-#ifdef HAVE_IMLIB
+#ifdef HAVE_IMLIB2
bool cText2SkinBitmap::LoadPng(const char *Filename) {
Imlib_Image image;
image = imlib_load_image(Filename);
@@ -48,8 +50,9 @@ bool cText2SkinBitmap::LoadPng(const char *Filename) {
int pal = 0, pos = 0;
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
- tColor col = (data[pos + 0] << 24) | (data[pos + 1] << 16) | (data[pos + 2] << 8) | data[pos + 3];
+ tColor col = (data[pos + 3] << 24) | (data[pos + 2] << 16) | (data[pos + 1] << 8) | data[pos + 0];
int res = Index(col);
+ //printf("color: r=%d,g=%d,b=%d,a=%d\n", data[pos], data[pos+1], data[pos+2], data[pos+3]);
if (pal > 0 && res == 0)
;//esyslog("ERROR: text2skin: Too many colors used in palette");
else