summaryrefslogtreecommitdiff
path: root/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'libcore')
-rw-r--r--libcore/imageloader.c38
-rw-r--r--libcore/imageloader.h1
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