def imwrite(data, filename): _, ext = os.path.splitext(filename.lower()) if ext == '.exr': ezexr.imwrite(filename, data) elif ext in ['.hdr', '.pic']: _hdr_write(filename, data) else: imsave_ldr(filename, np.clip(255.*data, 0, 255).astype('uint8'))
def save_hdr(_file, _filename): """ Saves HDR image :param _file: HDR data :param _filename: str, full path and name :return: none """ ezexr.imwrite(_filename, _file, pixeltype='HALF')
def imwrite(data, filename): _, ext = os.path.splitext(filename.lower()) if ext == '.exr': ezexr.imwrite(filename, data) elif ext in ['.hdr', '.pic']: _hdr_write(filename, data) else: scipy_io.imsave(filename, data)
def save_hdr(_file, _filename): import ezexr ezexr.imwrite(_filename, _file, pixeltype='HALF')