Fix regression in 0.7.13 that broke Comic Input when image output format was set to JPEG

This commit is contained in:
Kovid Goyal 2010-08-14 22:56:06 -06:00
parent 3b3cc6959f
commit 2884c0ca78

View File

@ -163,7 +163,11 @@ class PageProcessor(list):
wand.quantize(self.opts.colors)
dest = '%d_%d.%s'%(self.num, i, self.opts.output_format)
dest = os.path.join(self.dest, dest)
wand.save(dest+'8')
if dest.lower().endswith('.png'):
dest += '8'
wand.save(dest)
if dest.endswith('8'):
dest = dest[:-1]
os.rename(dest+'8', dest)
self.append(dest)