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
34
35
|
#ifndef _OSDIMAGE_BITMAP_H_
#define _OSDIMAGE_BITMAP_H_
#define X_DISPLAY_MISSING
#include <vdr/osd.h>
#include <vdr/skins.h>
#include <Magick++.h>
using namespace Magick;
class cOSDImageBitmap {
public:
cOSDImageBitmap();
~cOSDImageBitmap();
bool LoadZoomed(const char *file, int zoomWidth, int zoomHeight, int zoomLeft, int zoomTop);
bool Load(const char *file);
void Save(const char *file);
void Render(cBitmap &bmp, int wWindow, int hWindow, int colors, bool dither);
void Render(cBitmap &bmp, int colors, int alpha=255);
inline int Width() { return width; }
inline int Height() { return height; }
private:
bool LoadImageMagick(Image &imgkLoad, const char *file);
void QuantizeImageMagick(Image &imgkQuant, int colors, bool dither);
void ConvertImgk2Bmp(cBitmap &bmp, Image &imgkConv, int colors);
Image imgkZoom, imgkImage;
int ZoomWidth, ZoomHeight, ZoomLeft, ZoomTop;
int origWidth, origHeight;
bool loadingFailed;
int width, height;
};
#endif
|