From 5083fefad7e2c3d90822fc1cf7b8a63961f10848 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 20 May 2012 13:04:38 -0700 Subject: [PATCH] Map output type to proper extension --- cuburn/output.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cuburn/output.py b/cuburn/output.py index 8436b54..b8882aa 100644 --- a/cuburn/output.py +++ b/cuburn/output.py @@ -43,6 +43,7 @@ class PILOutput(Output, ClsMod): @staticmethod def save(buf, name, type=None, quality=98): + type = dict(jpg='jpeg', tif='tiff').get(type, type) if type == 'jpeg' or (type is None and name.endswith('.jpg')): buf = buf[:,:,:3] img = scipy.misc.toimage(buf, cmin=0, cmax=1)