kopia lustrzana https://github.com/hholzgra/maposmatic/
do not fail completely if ppmquant step fails
rodzic
5b50e2d66c
commit
6e1d5f7508
|
@ -479,9 +479,12 @@ class JobRenderer(threading.Thread):
|
|||
img.save(prefix + '.jpg', quality=50)
|
||||
img.thumbnail((200, 200), Image.ANTIALIAS)
|
||||
img.save(prefix + THUMBNAIL_SUFFIX)
|
||||
pngquant_cmd = [ "pngquant", "--output", "%s.8bit.png" % prefix,
|
||||
"%s.png" % prefix ]
|
||||
subprocess.check_call(pngquant_cmd)
|
||||
try:
|
||||
pngquant_cmd = [ "pngquant", "--output", "%s.8bit.png" % prefix,
|
||||
"%s.png" % prefix ]
|
||||
subprocess.check_call(pngquant_cmd)
|
||||
except Exception as e:
|
||||
l.warning("PNG color reduction failed: %s" % e)
|
||||
|
||||
def run(self):
|
||||
"""Renders the given job, encapsulating all processing errors and
|
||||
|
|
Ładowanie…
Reference in New Issue