glymur/_tiff.py
def tiff_header(read_buffer):
    """
    Interpret the uuid raw data as a tiff header.
    """
    # First 8 should be (73, 73, 42, 8) or (77, 77, 42, 8)
    data = struct.unpack('BB', read_buffer[0:2])
    if data[0] == 73 and data[1] == 73:
        # little endian
        endian = '<'
    elif data[0] == 77 and data[1] == 77:
        # big endian
        endian = '>'
    else:
        msg = (
            f"The byte order indication in the TIFF header "
            f"({read_buffer[0:2]}) is invalid.  It should be either "
            f"{bytes([73, 73])} or {bytes([77, 77])}."
        )
        raise RuntimeError(msg)

    _, offset = struct.unpack(endian + 'HI', read_buffer[2:8])

    # This is the 'Exif Image' portion.
    exif = ExifImageIfd(endian, read_buffer, offset)
    return exif.processed_ifd

    Interpret the uuid raw data as a tiff header.
    
Interpret the uuid raw data as a tiff header.
Interpret the uuid raw data as a tiff header .
def tiff_header(read_buffer):
    data = struct.unpack('BB', read_buffer[0:2])
    if data[0] == 73 and data[1] == 73:
        endian = '<'
    elif data[0] == 77 and data[1] == 77:
        endian = '>'
    else:
        msg = (
            f"The byte order indication in the TIFF header "
            f"({read_buffer[0:2]}) is invalid.  It should be either "
            f"{bytes([73, 73])} or {bytes([77, 77])}."
        )
        raise RuntimeError(msg)
    _, offset = struct.unpack(endian + 'HI', read_buffer[2:8])
    exif = ExifImageIfd(endian, read_buffer, offset)
    return exif.processed_ifd
def tiff_header ( read_buffer ) : data = struct . unpack ( 'BB' , read_buffer [ 0 : 2 ] ) if data [ 0 ] == 73 and data [ 1 ] == 73 : endian = '<' elif data [ 0 ] == 77 and data [ 1 ] == 77 : endian = '>' else : msg = ( f"The byte order indication in the TIFF header " f"({read_buffer[0:2]}) is invalid.  It should be either " f"{bytes([73, 73])} or {bytes([77, 77])}." ) raise RuntimeError ( msg ) _ , offset = struct . unpack ( endian + 'HI' , read_buffer [ 2 : 8 ] ) exif = ExifImageIfd ( endian , read_buffer , offset ) return exif . processed_ifd
Interpret the uuid raw data as a tiff header.
Interpret the uuid raw data as a tiff header .
"""
    Interpret the uuid raw data as a tiff header.
    """ # First 8 should be (73, 73, 42, 8) or (77, 77, 42, 8) # little endian # big endian # This is the 'Exif Image' portion.
read_buffer