Ejemplo n.º 1
0
def decode_jxr(data):
    """Decode JXR data stream into ndarray via temporary file."""
    fd, filename = tempfile.mkstemp(suffix='.jxr')
    with os.fdopen(fd, 'wb') as fh:
        fh.write(data)
    if isinstance(filename, unicode):
        filename = filename.encode('ascii')
    try:
        out = _czifile.decode_jxr(filename)
    finally:
        os.remove(filename)
    return out
Ejemplo n.º 2
0
def decode_jxr(data):
    """Decode JXR data stream into ndarray via temporary file."""
    fd, filename = tempfile.mkstemp(suffix='.jxr')
    with os.fdopen(fd, 'wb') as fh:
        fh.write(data)
    if isinstance(filename, unicode):
        filename = filename.encode('ascii')
    try:
        out = _czifile.decode_jxr(filename)
    finally:
        os.remove(filename)
    return out
Ejemplo n.º 3
0
def decode_jxr(data):
    """Decode JXR data stream into ndarray."""
    return _czifile.decode_jxr(data)
Ejemplo n.º 4
0
def decode_jxr(data):
    """Decode JXR data stream into ndarray."""
    return _czifile.decode_jxr(data)