from gi.repository import Gio
from gi.repository import Gdk
import logging
+import pprint
from wand.image import Image
from wand.color import Color
init_logging()
+#-------------------------------------------------------------------------
+def pp(value):
+ """
+ Returns a pretty print string of the given value.
+
+ @return: pretty print string
+ @rtype: str
+ """
+
+ pretty_printer = pprint.PrettyPrinter(indent = 4)
+ return pretty_printer.pformat(value)
+
#-------------------------------------------------------------------------
def get_desktop_environment():
#From http://stackoverflow.com/questions/2035657/what-is-my-current-desktop-environment
old_img = Image(filename = wpaper)
new_img = old_img.clone()
+exif = {}
+for k, v in old_img.metadata.items():
+ exif[k] = v
+log.debug("Found Metadata:\n%s", pp(exif))
+
(screen_width, screen_height) = get_max_monitor_geometry()
new_height = screen_height
new_width = int(float(old_img.width) / float(old_img.height) * float(screen_height))