mirror of
				https://github.com/stevenrobertson/cuburn.git
				synced 2025-10-31 17:30:46 -04:00 
			
		
		
		
	Map output type to proper extension
This commit is contained in:
		| @ -43,6 +43,7 @@ class PILOutput(Output, ClsMod): | |||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def save(buf, name, type=None, quality=98): |     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')): |         if type == 'jpeg' or (type is None and name.endswith('.jpg')): | ||||||
|             buf = buf[:,:,:3] |             buf = buf[:,:,:3] | ||||||
|         img = scipy.misc.toimage(buf, cmin=0, cmax=1) |         img = scipy.misc.toimage(buf, cmin=0, cmax=1) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Steven Robertson
					Steven Robertson