Exemplo n.º 1
0
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'))
Exemplo n.º 2
0
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')
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
def save_hdr(_file, _filename):
    import ezexr
    ezexr.imwrite(_filename, _file, pixeltype='HALF')