+
    Ai'0                        R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^RI	H
t
 ^RIHt . ROtRs/ t/ t/ tR. ROR	R.R
R./t]R 4       tR t]! 4       ;_uu_ 4        ]! 4        RRR4       R tR t]
! RRRR7      R 4       tR tR t]! 4       ;_uu_ 4        ]! 4        RRR4       ]
! RRRR7      RR l4       t]! 4       ;_uu_ 4        ]! 4       tRRR4       ]
! RRRR7      R 4       t]
! RRRR7      R R l4       tR t]! 4       R 4       t]
! RRRR7      R 4       t ]
! RRRR7      R 4       t!R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)!aK  Handle image reading, writing and plotting plugins.

To improve performance, plugins are only loaded as needed. As a result, there
can be multiple states for a given plugin:

    available: Defined in an *ini file located in ``skimage.io._plugins``.
        See also :func:`skimage.io.available_plugins`.
    partial definition: Specified in an *ini file, but not defined in the
        corresponding plugin module. This will raise an error when loaded.
    available but not on this system: Defined in ``skimage.io._plugins``, but
        a dependent library (e.g. Qt, PIL) is not available on your system.
        This will raise an error when loaded.
    loaded: The real availability is determined when it's explicitly loaded,
        either because it's one of the default plugins, or because it's
        loaded explicitly by the user.

N)ConfigParser)glob)contextmanager)deprecate_func)imread_collection_wrapperall
matplotlibimshowimshow_collectionc            	   #     "   \         P                  ! 4       ;_uu_ 4        \         P                  ! RR\        RR7       Rx  RRR4       R#   + '       g   i     R# ; i5i)z=Ignore warnings related to plugin infrastructure deprecation.ignorez0.*use `imageio` or other I/O packages directly.*skimage)actionmessagecategorymoduleN)warningscatch_warningsfilterwarningsFutureWarning     W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/skimage/io/manage_plugins.py!_hide_plugin_deprecation_warningsr   9   sC      
	 	 	"	"F"		
 	 
#	"	"	"s   A!#A
A!A		A!c                 "    R. R. R. R. R. R. /s R# )zHClear the plugin state to the default, i.e., where no plugins are loadedimreadimsaver	   imread_collectionr
   	_app_showNplugin_storer   r   r   _clear_pluginsr!   F   s)     	"""RRRLr   c                      . ROp V  F  p\        V\        R,          4       K  	  R \        P                  4        4       pV F  p\        V\        V,          4       K  	  R# )r   r   c              3   6   "   T F  qR 8w  g   K  Vx  K  	  R# 5i)r   Nr   ).0ps   & r   	<genexpr>*_load_preferred_plugins.<locals>.<genexpr>]   s     F7!:AA7s   
N)r   r	   r   r
   r   )_set_pluginpreferred_pluginskeys)io_typesp_typeplugin_typess      r   _load_preferred_pluginsr.   W   sR    WHF-e45  G0557FLF-f56 r   c                     V F  pV\         9  d   K   \        W R 7        R# 	  R#   \        \        \        3 d     K=  i ; i))kindN)_available_plugins
use_pluginImportErrorRuntimeErrorOSError)plugin_typeplugin_listplugins   && r   r(   r(   b   sC    ++	v0  \73 		s   'A Az0.25z0.27zoThe plugin infrastructure of `skimage.io` is deprecated. Instead, use `imageio` or other I/O packages directly.)deprecated_versionremoved_versionhintc                      \        4       ;_uu_ 4        \        4        \        4        R R R 4       R #   + '       g   i     R # ; iN)r   r!   r.   r   r   r   reset_pluginsr>   m   s(     
+	,	,! 
-	,	,	,s	   2A	c                    \        4       pVP                  V 4       VP                  4       ^ ,          p/ pVP                  V4       F  pVP	                  W$4      W4&   K  	  W#3# )z>Return plugin name and meta-data dict from plugin config file.)r   readsectionsoptionsget)filenameparsername	meta_dataopts   &    r   _parse_config_filerI   y   sX    ^F
KK??QDI~~d#D.	 $ ?r   c            	        \         P                  P                  \        4      p \	        \         P                  P                  V RR4      4      pV EF  p\        V4      w  r4RV9  d   \        P                  ! RV R24       K4  V\        V&   VR,          P                  R4       Uu. uF  qUP                  4       NK  	  ppV Uu. uF  qw\        9   g   K  VNK  	  ppV F"  pV\        9  g   K  \        RV RV R	24       K$  	  R
V9  ;'       d    RV9   p	V	'       d   VP                  R
4       V\        V&   \         P                  P!                  V4      RR \"        V&   EK  	  R# u upi u upi )zUScan the plugins directory for .ini files and parse them
to gather plugin meta-data.
_pluginsz*.iniprovideszfile z6 not recognized as a scikit-image io plugin, skipping.,zPlugin `z!` wants to provide non-existent `z`. Ignoring.r   r   N)ospathdirname__file__r   joinrI   r   warnplugin_meta_datasplitstripr    printappendplugin_providesbasenameplugin_module_name)
pdconfig_filesrD   rF   rG   srL   r%   valid_providesneed_to_add_collections
             r   _scan_pluginsrb      sK    
	"BRW=>L ,X6Y&MMz!WX !*'0'<'B'B3'GH'G!GGI'GH%-CXl1B!!XCA$&Gs,WX   ~5TT(n:T 	 "!!"56 .#%77#3#3H#=cr#B4 1 ! ICs   'E*E/E/c                >   \        4       p\        P                  4        F  pV F  w  r4VP                  V4       K  	  K!  	  / p\         FJ  pV '       d	   W19   g   K  \        V,           Uu. uF  qfP                  R4      '       d   K  VNK  	  upWS&   KL  	  V# u upi )a  List available plugins.

Parameters
----------
loaded : bool
    If True, show only those plugins currently loaded.  By default,
    all plugins are shown.

Returns
-------
p : dict
    Dictionary with plugin names as keys and exposed functions as
    values.

_)setr    valuesaddrZ   
startswith)loadedactive_pluginsplugin_funcr8   funcdfs   &      r   find_available_pluginsro      s    , UN#**,'LFv& ( - 	A!1$3F$;U$;q<<PSCT$;UAI " H Vs   ,B	Bc                   V \         9  d   \        RV  R24      h\         V ,          p\        V4      ^ 8X  d   RV  R2p\        V4      hVP	                  RR4      pVf   V^ ,          w  rgM1\        V4        V UU	u. uF  w  rW8X  g   K  V	NK  	  up	p^ ,          pV! V/ VB # u up	pi   \         d    \        RT RT  R	24      hi ; i)
aj  Find the appropriate plugin of 'kind' and execute it.

Parameters
----------
kind : {'imshow', 'imsave', 'imread', 'imread_collection'}
    Function to look up.
plugin : str, optional
    Plugin to load.  Defaults to None, in which case the first
    matching plugin is used.
*args, **kwargs : arguments and keyword arguments
    Passed to the plugin function.

zInvalid function (z) requested.z"No suitable plugin registered for z.

You may load I/O plugins with the `skimage.io.use_plugin` command.  A list of all available plugins are shown in the `skimage.io` docstring.r8   NzCould not find the plugin "z" for .)r    
ValueErrorlenr4   pop_load
IndexError)
r0   argskwargsplugin_funcsmsgr8   rd   rl   r%   rn   s
   &*,       r   call_pluginr{      s    ( <-dV<@AA%L
<A0 7& & 	 3ZZ$'F~q/4f	T$0@L&1AKAAL@CD    	 A 	T!<VHF4&PQRSS	Ts$   7B* <
B$B$B* $B* *Cc                   Vf   \         P                  4       pM3V\        V ,          9  d   \        RV  RV R24      hVR8X  d   VR.pMV.p\	        V 4       V Fv  pV\         9  d   \        RV R24      h\         V,          pV UUu. uF  w  rEW@8X  g   K  WE3NK  	  uppV UUu. uF  w  rEW@8w  g   K  WE3NK  	  upp,           pV\         V&   Kx  	  R# u uppi u uppi )	a&  Set the default plugin for a specified operation.  The plugin
will be loaded if it hasn't been already.

Parameters
----------
name : str
    Name of plugin. See ``skimage.io.available_plugins`` for a list of available
    plugins.
kind : {'imsave', 'imread', 'imshow', 'imread_collection', 'imshow_collection'}, optional
    Set the plugin for this function.  By default,
    the plugin is set for all functions.

Examples
--------
To use Matplotlib as the default image reader, you would write:

>>> from skimage import io
>>> io.use_plugin('matplotlib', 'imread')  # doctest: +SKIP

To see a list of available plugins run ``skimage.io.available_plugins``. Note
that this lists plugins that are defined, but the full list may not be usable
if your system does not have the required libraries installed.

NPlugin z does not support `z`.r	   r   'z!' is not a known plugin function.)r    r*   rZ   r4   ru   )rF   r0   kfuncsnrn   s   &&    r   r2   r2     s    > |  "t,,.A$rJKK8+&D6D	$KL 1#%FGHHQ ',9eFQqy!e9!&=
!&v!)FQF=
 
  Q  : =
s   	
CC'
C
6C
c                    \        V R4      '       g;   \        V R4      '       d'   \        V R4      p\        V4      p\        V RV4       R# R# R# )z9Add `imread_collection` to module if not already present.r   r   N)hasattrgetattrr   setattr)r   r   rl   s   &  r   #_inject_imread_collection_if_neededr   <  sH    6.//GFH4M4M*(0+T2 5N/r   c                   V \        RR7      9   d   R# V \        9  d   \        RV  R24      h\        V ,          p\        RV,           V.R7      p\        V ,          pV Fo  pVR8X  d   \        V4       M%\        W$4      '       g   \        RV  R	V R
24       K;  \        V,          p\        W$4      pW3V9  g   K]  VP                  W34       Kq  	  R# )zLoad the given plugin.

Parameters
----------
plugin : str
    Name of plugin to load.

See Also
--------
plugins : List of available plugins

T)ri   Nr}   z not found.zskimage.io._plugins.)fromlistr   z does not provide z as advertised.  Ignoring.)ro   r\   rr   
__import__rZ   r   r   rX   r    r   rY   )r8   modnameplugin_modulerL   r%   storerl   s   &      r   ru   ru   D  s     't44''76(+677$V,"#9G#CwiXv&H##/>**GF8#5aS8RSTQ}(>&LL&( r   c                Z     \         V ,          #   \         d    \        RT  R24      hi ; i)zReturn plugin meta-data.

Parameters
----------
plugin : str
    Name of plugin.

Returns
-------
m : dict
    Meta data as specified in plugin ``.ini``.

zNo information on plugin "")rU   KeyErrorrr   )r8   s   &r   plugin_infor   h  s9    (A'' A5fXQ?@@As    *c                 v    / p \          F&  p\         V,           UUu. uF  w  r#VNK	  	  uppW&   K(  	  V # u uppi )zReturn the currently preferred plugin order.

Returns
-------
p : dict
    Dictionary of preferred plugin order, with function name as key and
    plugins (in order of preference) as value.

r   )r%   rl   plugin_namern   s       r   plugin_orderr     s>      	A7CD7IJ7I#3K;7IJ H Ks   5)r2   r{   r   r   r>   ro   r1   )imageiopilr   )Fr=   )"__doc__os.pathrO   r   configparserr   r   
contextlibr   _shared.utilsr   
collectionr   __all__r    rZ   r\   rU   r)   r   r!   r.   r(   r>   rI   rb   ro   r1   r{   r2   r   ru   r   r   r   r   r   <module>r      s  $   %  % * 1   
 
+|n,	  	 	
 '(( )7 
=""
CD '((O ) 
=: '((/1 ) 
=%!%!P 
=2 2 j3 #$ ) % )F 
=AA( 
=k	 )(j )(N )(s$   D1E	E1E	E	E'	