From b968a310699595ff139278440ae278aebf112c1f Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Mon, 31 May 2004 19:56:56 +0000 Subject: - "Background" may be initialized with a color now - 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. --- bitmap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bitmap.c') 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 +#undef __STL_CONFIG_H #include "bitmap.h" #define X_DISPLAY_MISSING #include @@ -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 -- cgit v1.2.3