U
    ƒ±Ëh  ã                   @   s4   d dl mZ d dl mZ ddgZdd„ Zdd„ ZdS )é    )Úimread)Úimwriter   Úimsavec                 K   sT   |j d dkr$d|krd|d< d}n|j d dk}|rFd|krFd|d< t| |f|ŽS )	aš  Load a tiff image to file.

    Parameters
    ----------
    fname : str or file
        File name or file-like object.
    arr : ndarray
        The array to write.
    kwargs : keyword pairs, optional
        Additional keyword arguments to pass through (see ``tifffile``'s
        ``imwrite`` function).

    Notes
    -----
    Provided by the tifffile library [1]_, and supports many
    advanced image types including multi-page and floating-point.

    This implementation will set ``photometric='RGB'`` when writing if the first
    or last axis of `arr` has length 3 or 4. To override this, explicitly
    pass the ``photometric`` kwarg.

    This implementation will set ``planarconfig='SEPARATE'`` when writing if the
    first axis of arr has length 3 or 4. To override this, explicitly
    specify the ``planarconfig`` kwarg.

    References
    ----------
    .. [1] https://pypi.org/project/tifffile/

    r   )é   é   ZplanarconfigZSEPARATETéÿÿÿÿZphotometricZRGB)ÚshapeÚtifffile_imwrite)ÚfnameZarrÚkwargsZrgb© r   úG/tmp/pip-unpacked-wheel-gtraehzf/skimage/io/_plugins/tifffile_plugin.pyr      s    c                 K   s"   d|kr|  d¡|d< t| f|ŽS )aí  Load a tiff image from file.

    Parameters
    ----------
    fname : str or file
        File name or file-like-object.
    kwargs : keyword pairs, optional
        Additional keyword arguments to pass through (see ``tifffile``'s
        ``imread`` function).

    Notes
    -----
    Provided by the tifffile library [1]_, and supports many
    advanced image types including multi-page and floating point.

    References
    ----------
    .. [1] https://pypi.org/project/tifffile/

    Zimg_numÚkey)ÚpopÚtifffile_imread)r
   r   r   r   r   r   2   s    N)Ztifffiler   r   r   r	   Ú__all__r   r   r   r   r   Ú<module>   s   +