summaryrefslogtreecommitdiff
path: root/bitmap.c
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2009-07-13 18:20:55 +0300
committerVille Skyttä <ville.skytta@iki.fi>2009-07-13 18:20:55 +0300
commit3313495b0d4103fe62f783b5dc5b723d57c4ed9e (patch)
treeeda2b1da3296d87d3551a441d3f78864359e6d26 /bitmap.c
parentc0542dc4cef38987a1e377ac5d31a8987c9955d3 (diff)
downloadvdr-plugin-text2skin-3313495b0d4103fe62f783b5dc5b723d57c4ed9e.tar.gz
vdr-plugin-text2skin-3313495b0d4103fe62f783b5dc5b723d57c4ed9e.tar.bz2
Interface/preprocessor directive cleanups.
Diffstat (limited to 'bitmap.c')
-rw-r--r--bitmap.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/bitmap.c b/bitmap.c
index 9c6b985..e58b251 100644
--- a/bitmap.c
+++ b/bitmap.c
@@ -62,16 +62,7 @@ cText2SkinBitmap *cText2SkinBitmap::Load(const std::string &Filename, int Alpha,
if (fname.substr(len - 4, 4) == ".xpm")
result = res->LoadXpm(fname.c_str());
else {
-#ifdef HAVE_IMLIB2
- result = res->LoadImlib(fname.c_str(),height,width,colors, Quiet);
-#else
-# ifdef HAVE_IMAGEMAGICK
- result = res->LoadMagick(fname.c_str(),height,width,colors, Quiet);
-# else
- if (!Quiet)
- esyslog("ERROR: text2skin: unknown file format for %s", fname);
-# endif
-#endif
+ result = res->LoadNonXpm(fname.c_str(), height, width, colors, Quiet);
}
} else if (!Quiet)
esyslog("ERROR: text2skin: filename %s too short to identify format", fname.c_str());
@@ -159,8 +150,15 @@ bool cText2SkinBitmap::LoadXpm(const char *Filename) {
return false;
}
+#if !(defined(HAVE_IMLIB2) || defined(HAVE_IMAGEMAGICK))
+bool cText2SkinBitmap::LoadNonXpm(const char *Filename, int height, int width, int colors, bool Quiet) {
+ if (!Quiet)
+ esyslog("ERROR: text2skin: unknown file format for %s", Filename);
+}
+#endif
+
#ifdef HAVE_IMLIB2
-bool cText2SkinBitmap::LoadImlib(const char *Filename, int height, int width, int colors, bool Quiet) {
+bool cText2SkinBitmap::LoadNonXpm(const char *Filename, int height, int width, int colors, bool Quiet) {
Imlib_Image image;
unsigned char * outputImage = NULL;
unsigned int * outputPalette = NULL;
@@ -205,7 +203,7 @@ bool cText2SkinBitmap::LoadImlib(const char *Filename, int height, int width, in
#endif
#ifdef HAVE_IMAGEMAGICK
-bool cText2SkinBitmap::LoadMagick(const char *Filename, int height, int width, int colors, bool Quiet) {
+bool cText2SkinBitmap::LoadNonXpm(const char *Filename, int height, int width, int colors, bool Quiet) {
std::vector<Image> images;
cBitmap *bmp = NULL;
try {