Exemplo n.º 1
0
def identify_data(data):
    '''
    Identify the image in data. Returns a 3-tuple
    (width, height, format)
    or raises an Exception if data is not an image.
    '''
    fmt, width, height = _identify(data)
    return width, height, fmt
Exemplo n.º 2
0
def identify_data(data):
    '''
    Identify the image in data. Returns a 3-tuple
    (width, height, format)
    or raises an Exception if data is not an image.
    '''
    fmt, width, height = _identify(data)
    return width, height, fmt
Exemplo n.º 3
0
def identify(path):
    '''
    Identify the image at path. Returns a 3-tuple
    (width, height, format)
    or raises an Exception.
    '''
    with lopen(path, 'rb') as f:
        fmt, width, height = _identify(f)
    return width, height, fmt
Exemplo n.º 4
0
def identify(path):
    '''
    Identify the image at path. Returns a 3-tuple
    (width, height, format)
    or raises an Exception.
    '''
    with lopen(path, 'rb') as f:
        fmt, width, height = _identify(f)
    return width, height, fmt