summaryrefslogtreecommitdiff
path: root/imageloader.h
blob: 31bc692c952ecce3787c153fe78a561be9890210 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __NOPACITY_IMAGELOADER_H
#define __NOPACITY_IMAGELOADER_H

#define X_DISPLAY_MISSING

#include <vdr/osd.h>
#include <vdr/skins.h>
#include <Magick++.h>

using namespace Magick;
 
class cImageLoader {
public:
    cImageLoader();
    ~cImageLoader();
    cImage GetImage();
    bool LoadLogo(const char *logo, int width, int height);
    bool LoadIcon(const char *cIcon, int size);
    bool LoadIcon(const char *cIcon, int width, int height, bool preserveAspect = true);
    bool LoadEPGImage(int eventID);
    bool LoadAdditionalEPGImage(cString name);
    bool LoadRecordingImage(cString Path);
    void DrawBackground(tColor back, tColor blend, int width, int height);
    void DrawBackground2(tColor back, tColor blend, int width, int height);
private:
    Image buffer;
    Color Argb2Color(tColor col);
    void toLowerCase(std::string &str);
    bool LoadImage(cString FileName, cString Path, cString Extension);
	bool FirstImageInFolder(cString Path, cString Extension, cString *recImage);
};

#endif //__NOPACITY_IMAGELOADER_H