summaryrefslogtreecommitdiff
path: root/imagemagickwrapper.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-12-08 11:15:38 +0100
committerlouis <louis.braun@gmx.de>2013-12-08 11:15:38 +0100
commit55a85eeb631da6d565fb624dd679912568eeba5c (patch)
tree13d45a3dc6bab981158854347bc8fd36ba0771d8 /imagemagickwrapper.c
parent76ad37217ef27fee821a689f33251d21b9ed302a (diff)
downloadskin-nopacity-55a85eeb631da6d565fb624dd679912568eeba5c.tar.gz
skin-nopacity-55a85eeb631da6d565fb624dd679912568eeba5c.tar.bz2
Extended image loading logging only if activated in setup
Diffstat (limited to 'imagemagickwrapper.c')
-rw-r--r--imagemagickwrapper.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c
index 8aa6136..49fa221 100644
--- a/imagemagickwrapper.c
+++ b/imagemagickwrapper.c
@@ -78,13 +78,16 @@ bool cImageMagickWrapper::LoadImage(std::string FileName, std::string Path, std:
if (config.GetValue("debugImageLoading"))
dsyslog("nopacity: %s sucessfully loaded", imgFile.c_str());
} catch( Magick::Warning &warning ) {
- dsyslog("nopacity: Magick Warning: %s", warning.what());
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: Magick Warning: %s", warning.what());
return true;
} catch( Magick::Error &error ) {
- dsyslog("nopacity: Magick Error: %s", error.what());
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: Magick Error: %s", error.what());
return false;
} catch(...) {
- dsyslog("nopacity: an unknown Magick error occured during image loading");
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: an unknown Magick error occured during image loading");
return false;
}
return true;
@@ -100,13 +103,16 @@ bool cImageMagickWrapper::LoadImage(const char *fullpath) {
if (config.GetValue("debugImageLoading"))
dsyslog("nopacity: %s sucessfully loaded", fullpath);
} catch( Magick::Warning &warning ) {
- dsyslog("nopacity: Magick Warning: %s", warning.what());
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: Magick Warning: %s", warning.what());
return true;
} catch( Magick::Error &error ) {
- dsyslog("nopacity: Magick Error: %s", error.what());
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: Magick Error: %s", error.what());
return false;
} catch(...) {
- dsyslog("nopacity: an unknown Magick error occured during image loading");
+ if (config.GetValue("debugImageLoading"))
+ dsyslog("nopacity: an unknown Magick error occured during image loading");
return false;
}
return true;