Пример #1
0
def decode(data_buffer):
    """
    Decode grey-scale image via JPEG-LS using CharLS implementation.
    """

    data_image = _CharLS.decode(data_buffer)

    return data_image
Пример #2
0
def decode(data_buffer):
    """
    Decode grey-scale image via JPEG-LS using CharLS implementation.
    """

    data_image = _CharLS.decode(data_buffer)

    return data_image
Пример #3
0
def read(fname):
    """
    Read image data from JPEG-LS file.
    """
    with open(fname, "rb") as fo:
        string_buffer = fo.read()

    data_buffer = np.fromstring(string_buffer, dtype=np.uint8)

    data_image = _CharLS.decode(data_buffer)

    # Done.
    return data_image
Пример #4
0
def read(fname):
    """
    Read image data from JPEG-LS file.
    """
    with open(fname, 'rb') as fo:
        string_buffer = fo.read()

    data_buffer = np.fromstring(string_buffer, dtype=np.uint8)

    data_image = _CharLS.decode(data_buffer)

    # Done.
    return data_image