def fourcc_to_int(value, byteorder='little', signed=False):
    """
    Converts a string of 4 characters into a 32-bit integer using
    the supplied byteorder, signage, and latin1 encoding.

    Returns the encoded int.
    """
    assert len(value
        ) == 4, 'The supplied four character code string must be 4 characters long.'
    return int.from_bytes(bytes(value, encoding='latin1'), byteorder,
        signed=signed)
