Merge remote-tracking branch 'julienmalik/cache_improvements'

Conflicts:
	prosopopee/prosopopee.py
This commit is contained in:
Laurent Peuch 2016-02-19 09:52:45 +01:00
commit ad8c1a5aad

View File

@ -47,8 +47,9 @@ class Image(object):
"target": target,
"auto-orient" : "-auto-orient" if options["auto-orient"] else "",
"strip": "-strip" if options["strip"] else "",
"quality": "-quality %s" % options["quality"] if options.has_key("quality") else "-define jpeg:preserve-settings",
"resize": "-resize %s" % options["resize"] if options.has_key("resize") and options["resize"] is not None else ""
"quality": "-quality %s" % options["quality"] if "quality" in options else "-define jpeg:preserve-settings",
"resize": "-resize %s" % options["resize"] if options.get("resize", None) is not None else ""
}
command = "gm convert {source} {auto-orient} {strip} {quality} {resize} {target}".format(**gm_switches)
print command
@ -57,7 +58,6 @@ class Image(object):
else:
print "skipped %s since it's already generated (based on source unchanged size and images options set in your gallery's settings.yaml)" % target
def copy(self):
source, target = os.path.join(self.base_dir, self.name), os.path.join(self.target_dir, self.name)