def _convert_to_pillow_kwargs(arg):
    """
    Converts a string to the correct keyword to use for tiff compression in pillow.

    Parameters
    ----------
    arg : str
        The string keyword used in the PySimpleGUI window.

    Return
    ------
    arg_mapping[arg] : None or str
        The keyword in pillow associated with the input arg string.

    """

    arg_mapping = {
        'None': None, 'Deflate': 'tiff_deflate', 'LZW': 'tiff_lzw',
        'Pack Bits': 'packbits', 'JPEG': 'jpeg'
    }

    return arg_mapping[arg]