diff options
author | louis <louis.braun@gmx.de> | 2014-11-21 19:19:59 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-11-21 19:19:59 +0100 |
commit | a34a824527f9ab911f20f0b42d6fdd311a19829a (patch) | |
tree | 9c029fc22d1a3f38a9b08504be6b9e0d7d6d32d6 /libcore | |
parent | e7abb8557eb8397172a360845b7ac5f7607ca158 (diff) | |
download | vdr-plugin-skindesigner-a34a824527f9ab911f20f0b42d6fdd311a19829a.tar.gz vdr-plugin-skindesigner-a34a824527f9ab911f20f0b42d6fdd311a19829a.tar.bz2 |
changed handling of channel logos, width and height are now mandatory
Diffstat (limited to 'libcore')
-rw-r--r-- | libcore/imageloader.c | 38 | ||||
-rw-r--r-- | libcore/imageloader.h | 1 |
2 files changed, 0 insertions, 39 deletions
diff --git a/libcore/imageloader.c b/libcore/imageloader.c index 139e2d0..ea7d983 100644 --- a/libcore/imageloader.c +++ b/libcore/imageloader.c @@ -16,7 +16,6 @@ cImageLoader::~cImageLoader() { cImage *cImageLoader::CreateImage(int width, int height, bool preserveAspect) { if (!importer) return NULL; - int w, h; importer->GetImageSize(w, h); if (width == 0) @@ -92,43 +91,6 @@ bool cImageLoader::LoadImage(std::string Path, std::string FileName, std::string return LoadImage(imgFile.c_str()); } -void cImageLoader::DeterminateChannelLogoSize(int &width, int &height) { - cString logoPath; - cString logoPathSkin = cString::sprintf("%s%s/themes/%s/logos/", *config.skinPath, Setup.OSDSkin, Setup.OSDTheme); - - if (FolderExists(*logoPathSkin)) - logoPath = logoPathSkin; - else - logoPath = config.logoPath; - - DIR *folder = NULL; - struct dirent *file; - folder = opendir(logoPath); - if (!folder) - return; - - while ( (file = readdir(folder)) ) { - if (endswith(file->d_name, ".png") || - endswith(file->d_name, ".svg")) { - std::stringstream filePath; - filePath << *logoPath << file->d_name; - if (LoadImage(filePath.str().c_str())) { - int logoWidth = 0; - int logoHeight = 0; - importer->GetImageSize(logoWidth, logoHeight); - if (logoWidth > 0 && logoHeight > 0) { - width = logoWidth; - height = logoHeight; - delete(importer); - importer = NULL; - return; - } - } - } - } -} - - // // Image importer for PNG // diff --git a/libcore/imageloader.h b/libcore/imageloader.h index a06f433..64eea07 100644 --- a/libcore/imageloader.h +++ b/libcore/imageloader.h @@ -76,7 +76,6 @@ public: cImage *CreateImage(int width, int height, bool preserveAspect = true); bool LoadImage(std::string Path, std::string FileName, std::string Extension); bool LoadImage(const char *fullpath); - void DeterminateChannelLogoSize(int &width, int &height); }; #endif //__NOPACITY_IMAGELOADER_H |