Ë
    ÿ[;jã#  ã                   óˆ  — d dl Z d dlZd dlZddlmZmZmZmZ ddl	m
Z
 ddlmZ ddlmZmZ ddlmZmZ dd	lmZ g d
¢ZdZ eddde¬«      defd„«       Z eddde¬«      defd„«       Z eddde¬«      efddœd„«       Z eddd¬«      dd„«       Z eddd¬«      dd„«       Z e
dd«       eddd¬«      d„ «       «       Zy)é    Né   )ÚwarnÚdeprecate_funcÚdeprecate_parameterÚ
DEPRECATED)Úrequire)Úis_low_contrast)Úrgb2grayÚrgba2rgb)Úcall_pluginÚ!_hide_plugin_deprecation_warningsé   )Úfile_or_url_context)ÚimreadÚimsaveÚimshowÚshowÚimread_collectionÚimshow_collectionaQ  The plugin infrastructure in `skimage.io` and the parameter `{deprecated_name}` are deprecated since version {deprecated_version} and will be removed in {changed_version} (or later). To avoid this warning, please do not use the parameter `{deprecated_name}`. Instead, use `imageio` or other I/O packages directly. See also `{func_name}`.Úpluginz0.25z0.27)Ústart_versionÚstop_versionÚtemplateFc                 óè  — |t         u rd}|rd}t        j                  |t        d¬«       t	        | t
        j                  «      rt        | j                  «       «      } |€-t        | d«      r!| j                  «       j                  d«      rd}t        | «      5 } t        «       5  t        d| fd	|i|¤Ž}ddd«       ddd«       t        d
«      s|S |j                  dkD  rz|j                   d   dvr?|j                   d   dv r.t#        j$                  |dd«      }t#        j$                  |dd«      }|r(|j                   d   dk(  rt'        |«      }t)        |«      }|S # 1 sw Y   ŒªxY w# 1 sw Y   Œ®xY w)a�  Load an image from file.

    Parameters
    ----------
    fname : str or pathlib.Path
        Image file name, e.g. ``test.jpg`` or URL.
    as_gray : bool, optional
        If True, convert color images to gray-scale (64-bit floats).
        Images that are already in gray-scale format are not converted.

    Other Parameters
    ----------------
    plugin_args : DEPRECATED
        The plugin infrastructure is deprecated.

    Returns
    -------
    img_array : ndarray
        The different color bands/channels are stored in the
        third dimension, such that a gray-image is MxN, an
        RGB-image MxNx3 and an RGBA-image MxNx4.

    Na-  The plugin infrastructure in `skimage.io` is deprecated since version 0.25 and will be removed in 0.27 (or later). To avoid this warning, please do not pass additional keyword arguments for plugins (`**plugin_args`). Instead, use `imageio` or other I/O packages directly. See also `skimage.io.imread`.é   ©ÚcategoryÚ
stacklevelÚlower©z.tiffz.tifÚtifffiler   r   Úndimr   éÿÿÿÿ)r   é   éýÿÿÿéþÿÿÿr$   )r   Úwarningsr   ÚFutureWarningÚ
isinstanceÚpathlibÚPathÚstrÚresolveÚhasattrr   Úendswithr   r   r   r"   ÚshapeÚnpÚswapaxesr   r
   )ÚfnameÚas_grayr   Úplugin_argsÚmsgÚimgs         úWG:\00. PROJECTS\API\Inventory\templateJSON\kerjaOCR\Lib\site-packages\skimage/io/_io.pyr   r       s@  € ð< ”ÑØˆÙðCð 	ô 	�‰�c¤M¸aÕ@ä�%œŸ™Ô&Ü�E—M‘M“OÓ$ˆà€~œ' %¨Ô1Ø�;‰;‹=×!Ñ!Ð"3Ô4ØˆFä	˜UÔ	# uÔ.OÕ.QÜ˜( EÑH°&ÐH¸KÑHˆ÷ /R×	#ô �3˜ÔØˆ
à
‡x�x�!‚|Ø�9‰9�R‰= Ñ&¨3¯9©9°R©=¸FÑ+BÜ—+‘+˜c 2 rÓ*ˆCÜ—+‘+˜c 2 rÓ*ˆCáØ�y‰y˜‰|˜qÒ Ü˜s“m�Ü˜3“-ˆCà€J÷! /RÐ.Qú×	#Ð	#ús$   ÂE(Â#EÂ3E(ÅE%	Å!E(Å(E1Tc                 ó¶   — |t         u rd}|rd}t        j                  |t        d¬«       t	        «       5  t        d| |fd|i|¤Žcddd«       S # 1 sw Y   yxY w)a³  
    Load a collection of images.

    Parameters
    ----------
    load_pattern : str or list
        List of objects to load. These are usually filenames, but may
        vary depending on the currently active plugin. See :class:`ImageCollection`
        for the default behaviour of this parameter.
    conserve_memory : bool, optional
        If True, never keep more than one in memory at a specific
        time.  Otherwise, images will be cached once they are loaded.

    Returns
    -------
    ic : :class:`ImageCollection`
        Collection of images.

    Other Parameters
    ----------------
    plugin_args : DEPRECATED
        The plugin infrastructure is deprecated.

    Na8  The plugin infrastructure in `skimage.io` is deprecated since version 0.25 and will be removed in 0.27 (or later). To avoid this warning, please do not pass additional keyword arguments for plugins (`**plugin_args`). Instead, use `imageio` or other I/O packages directly. See also `skimage.io.imread_collection`.r   r   r   r   )r   r'   r   r(   r   r   )Úload_patternÚconserve_memoryr   r5   r6   s        r8   r   r   d   si   € ðB ”ÑØˆÙðNð 	ô 	�‰�c¤M¸aÕ@Ü	*Õ	,ÜØØØñ
ð ð	
ð
 ñ
÷ 
-×	,Ò	,ús   µAÁA)Úcheck_contrastc                ó  — |t         u rd}|rd}t        j                  |t        d¬«       t	        | t
        j                  «      rt        | j                  «       «      } |€-t        | d«      r!| j                  «       j                  d«      rd}|j                  t        k(  r$t        | › d�d¬	«       |j                  d
«      dz  }|rt        |«      rt        | › d�«       t!        «       5  t#        d| |fd|i|¤Žcddd«       S # 1 sw Y   yxY w)a�  Save an image to file.

    Parameters
    ----------
    fname : str or pathlib.Path
        Target filename.
    arr : ndarray of shape (M,N) or (M,N,3) or (M,N,4)
        Image data.
    check_contrast : bool, optional
        Check for low contrast and print warning (default: True).

    Other Parameters
    ----------------
    plugin_args : DEPRECATED
        The plugin infrastructure is deprecated.
    Na-  The plugin infrastructure in `skimage.io` is deprecated since version 0.25 and will be removed in 0.27 (or later). To avoid this warning, please do not pass additional keyword arguments for plugins (`**plugin_args`). Instead, use `imageio` or other I/O packages directly. See also `skimage.io.imsave`.r   r   r   r    r!   z~ is a boolean image: setting True to 255 and False to 0. To silence this warning, please convert the image using img_as_ubyte.)r   Úuint8éÿ   z is a low contrast imager   r   )r   r'   r   r(   r)   r*   r+   r,   r-   r.   r   r/   ÚdtypeÚboolÚastyper	   r   r   )r3   Úarrr   r<   r5   r6   s         r8   r   r   š   sö   € ð. ”ÑØˆÙðCð 	ô 	�‰�c¤M¸aÕ@ä�%œŸ™Ô&Ü�E—M‘M“OÓ$ˆØ€~œ' %¨Ô1Ø�;‰;‹=×!Ñ!Ð"3Ô4ØˆFØ
‡y�y”DÒÜØˆgð ð ð õ		
ð �j‰j˜Ó! CÑ'ˆÙœ/¨#Ô.Ü�ˆwÐ.Ð/Ô0ä	*Õ	,Ü˜8 U¨CÑN¸ÐNÀ+ÑN÷ 
-×	,Ò	,ús   Ã)DÄDz<Please use `matplotlib`, `napari`, etc. to visualize images.)Údeprecated_versionÚremoved_versionÚhintc                 óœ   — t        | t        «      rt        d| |¬«      } t        «       5  t        d| fd|i|¤Žcddd«       S # 1 sw Y   yxY w)a…  Display an image.

    Parameters
    ----------
    arr : ndarray or str
        Image data or name of image file.
    plugin : str
        Name of plugin to use.  By default, the different plugins are
        tried (starting with imageio) until a suitable candidate is found.

    Other Parameters
    ----------------
    plugin_args : keywords
        Passed to the given plugin.

    r   )r   r   r   N)r)   r,   r   r   )rC   r   r5   s      r8   r   r   Ñ   sB   € ô, �#”sÔÜ˜( C°Ô7ˆÜ	*Õ	,Ü˜8 SÑG°ÐG¸;ÑG÷ 
-×	,Ò	,ús   ©AÁAc                 ó`   — t        «       5  t        d| fd|i|¤Žcddd«       S # 1 sw Y   yxY w)zïDisplay a collection of images.

    Parameters
    ----------
    ic : :class:`ImageCollection`
        Collection to display.

    Other Parameters
    ----------------
    plugin_args : keywords
        Passed to the given plugin.

    r   r   N©r   r   )Úicr   r5   s      r8   r   r   í   s+   € ô& 
+Õ	,ÜÐ.°ÑQ¸6ÐQÀ[ÑQ÷ 
-×	,Ò	,ús   ‹$¤-Ú
matplotlibz>=3.3c                  óX   — t        «       5  t        d«      cddd«       S # 1 sw Y   yxY w)a  Display pending images.

    Launch the event loop of the current GUI plugin, and display all
    pending images, queued via `imshow`. This is required when using
    `imshow` from non-interactive scripts.

    A call to `show` will block execution of code until all windows
    have been closed.

    Examples
    --------
    >>> import skimage.io as io
    >>> rng = np.random.default_rng()
    >>> for i in range(4):
    ...     ax_im = io.imshow(rng.random((50, 50)))  # doctest: +SKIP
    >>> io.show() # doctest: +SKIP

    Ú	_app_showNrI   © ó    r8   r   r     s   € ô2 
+Õ	,Ü˜;Ó'÷ 
-×	,Ò	,ús   ‹  ))N)r*   r'   Únumpyr1   Ú_shared.utilsr   r   r   r   Ú_shared.version_requirementsr   Úexposurer	   Úcolor.colorconvr
   r   Úio.manage_pluginsr   r   Úutilr   Ú__all__Ú_remove_plugin_param_templater   r   r   r   r   r   rN   rO   r8   Ú<module>rY      s<  ðÛ Û ã ç QÓ QÝ 2Ý &ß 0ß NÝ %ò€ð>ð ñ ØØØØ*ô	ð  ¨
ò ;óð;ñ| ØØØØ*ô	ð #'¨zò-
óð-
ñ` ØØØØ*ô	ð )ð .O¸Dó .Oóð.Oñb ØØØ	Gôò
Hóð
Hñ. ØØØ	Gôò
Róð
Rñ$ 	ˆ�wÓÙØØØ	Gôñ
(óó  ñ(rO   