diff options
| author | louis <louis.braun@gmx.de> | 2013-08-25 13:57:10 +0200 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2013-08-25 13:57:10 +0200 |
| commit | 9eabdcd20960924b690d6820691c6159618d18e7 (patch) | |
| tree | 522dcf224f2aaa1f8bee92ca4ecaec35fc71ed4a /imageloader.c | |
| parent | c545f6b4cfc4c8fe604eb216fb1d8c86550e74ca (diff) | |
| download | vdr-plugin-tvguide-9eabdcd20960924b690d6820691c6159618d18e7.tar.gz vdr-plugin-tvguide-9eabdcd20960924b690d6820691c6159618d18e7.tar.bz2 | |
Added tvscraper support
Diffstat (limited to 'imageloader.c')
| -rw-r--r-- | imageloader.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/imageloader.c b/imageloader.c index 292d183..1b8fc71 100644 --- a/imageloader.c +++ b/imageloader.c @@ -59,6 +59,14 @@ bool cImageLoader::LoadAdditionalEPGImage(cString name) { return true; } +bool cImageLoader::LoadPoster(const char *poster, int width, int height) { + if (LoadImage(poster)) { + buffer.sample(Geometry(width, height)); + return true; + } + return false; +} + bool cImageLoader::LoadIcon(const char *cIcon, int size) { if (size==0) return false; @@ -130,3 +138,14 @@ bool cImageLoader::LoadImage(cString FileName, cString Path, cString Extension) } return true; } + +bool cImageLoader::LoadImage(const char *fullpath) { + try { + //dsyslog("tvguide: trying to load: %s", fullpath); + buffer.read(fullpath); + //dsyslog("tvguide: %s sucessfully loaded", fullpath); + } catch (...) { + return false; + } + return true; +}
\ No newline at end of file |
