def is_format_selected(image_format, formats, progs):
    """Determine if the image format is selected by command line arguments."""
    intersection = formats & Settings.formats
    mode = _is_program_selected(progs)
    result = (image_format in intersection) and mode
    return result