mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Map output type to proper extension
This commit is contained in:
parent
3666d4bee8
commit
5083fefad7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user