diff options
author | Maniac <maniac> | 2011-05-10 20:46:03 +0200 |
---|---|---|
committer | Maniac <maniac> | 2011-05-10 20:46:03 +0200 |
commit | 032f825e6adc49ea52e45410bf98c90ae6fd27ec (patch) | |
tree | 2fc7e5a9bf65f720fc31f3072b16ab37007eafd1 /bitmap.h | |
download | vdr-plugin-skinpearlhd-0.0.1.tar.gz vdr-plugin-skinpearlhd-0.0.1.tar.bz2 |
initial import0.0.1
Diffstat (limited to 'bitmap.h')
-rw-r--r-- | bitmap.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bitmap.h b/bitmap.h new file mode 100644 index 0000000..debbbe8 --- /dev/null +++ b/bitmap.h @@ -0,0 +1,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 |