diff options
author | louis <louis.braun@gmx.de> | 2013-08-21 10:26:50 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-08-21 10:26:50 +0200 |
commit | 9e1fcfc0bff753031617324b5244805080be9430 (patch) | |
tree | f7a574ff7223751f4d2da9b295b90c50530e3dc8 /imageloader.c | |
parent | e99e14c6f02164f53fb5ef01cdc8f091aac1fc4a (diff) | |
download | skin-nopacity-9e1fcfc0bff753031617324b5244805080be9430.tar.gz skin-nopacity-9e1fcfc0bff753031617324b5244805080be9430.tar.bz2 |
Version 0.1.3, Added TVScrapper 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 bfc4ce5..ba90353 100644 --- a/imageloader.c +++ b/imageloader.c @@ -159,6 +159,14 @@ bool cImageLoader::LoadAdditionalRecordingImage(cString path, cString name) { return false; } +bool cImageLoader::LoadPoster(const char *poster, int width, int height) { + if (LoadImage(poster)) { + buffer.sample(Geometry(width, height)); + return true; + } + return false; +} + void cImageLoader::DrawBackground(tColor back, tColor blend, int width, int height, bool mirror) { Color Back = Argb2Color(back); Color Blend = Argb2Color(blend); @@ -230,6 +238,17 @@ bool cImageLoader::LoadImage(cString FileName, cString Path, cString Extension) return true; } +bool cImageLoader::LoadImage(const char *fullpath) { + try { + dsyslog("nopacity: trying to load: %s", fullpath); + buffer.read(fullpath); + dsyslog("nopacity: %s sucessfully loaded", fullpath); + } catch (...) { + return false; + } + return true; +} + bool cImageLoader::FirstImageInFolder(cString Path, cString Extension, cString *recImage) { DIR *folder; struct dirent *file; |