diff options
author | louis <louis.braun@gmx.de> | 2013-12-08 11:15:38 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-12-08 11:15:38 +0100 |
commit | 55a85eeb631da6d565fb624dd679912568eeba5c (patch) | |
tree | 13d45a3dc6bab981158854347bc8fd36ba0771d8 /imagemagickwrapper.c | |
parent | 76ad37217ef27fee821a689f33251d21b9ed302a (diff) | |
download | skin-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.c | 18 |
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; |