[enh] use gm -strip option

This commit is contained in:
Julien Malik 2016-02-17 10:20:36 +01:00
parent 3818012f91
commit d522b6c25b

View File

@ -100,7 +100,7 @@ class Image(object):
shutil.copyfile(source, target) shutil.copyfile(source, target)
print source, "->", target print source, "->", target
else: else:
command = "gm convert -auto-orient %s %s" % (source, target) command = "gm convert %s -auto-orient -strip %s" % (source, target)
print command print command
os.system(command) os.system(command)
@ -117,7 +117,7 @@ class Image(object):
gm_options = "" gm_options = ""
if self.autoorient: if self.autoorient:
gm_options = "-auto-orient" gm_options = "-auto-orient"
command = "gm convert %s %s -resize %s -quality %s %s" % (gm_options, source, gm_geometry, self.quality, target) command = "gm convert %s -strip %s -resize %s -quality %s %s" % (source, gm_options, gm_geometry, self.quality, target)
print command print command
os.system(command) os.system(command)
CACHE.cache_thumbnail(source, target, self) CACHE.cache_thumbnail(source, target, self)