"and" relationship between the two png compressor commands

This commit is contained in:
Kálmán Tarnay 2010-03-30 00:26:29 +02:00
parent b0b0dd9244
commit ecfc4af6a3

View file

@ -303,7 +303,7 @@ class Image:
raise "Tried to compress invalid image (unsupported format or not file)" raise "Tried to compress invalid image (unsupported format or not file)"
runString = { runString = {
"jpeg": u"jpegoptim -f --strip-all '%(file)s'", "jpeg": u"jpegoptim -f --strip-all '%(file)s'",
"png" : u"optipng -force -o7 '%(file)s'; advpng -z4 '%(file)s'"} "png" : u"optipng -force -o7 '%(file)s'&&advpng -z4 '%(file)s'"}
retcode = call(runString[self.filetype] % {"file": self.fullpath}, retcode = call(runString[self.filetype] % {"file": self.fullpath},
shell = True, stdout=PIPE) shell = True, stdout=PIPE)
if retcode == 0: if retcode == 0: