
    h,                    *   % S SK Jr  S SKrS SKrS SKrS SKrS SKJr  S SKrSSK	J
r
  SSKJr  SSS	S
SSS.rS,S jrS-S jrS.S jrSSSSS.rS,S jrS-S jrS.S jrSSSSSSSSSS S!S".rS#\S$'   S/S% jrS-S& jrS.S' jrS/S( jrS-S) jrS.S* jrS0S1S+ jjrg)2    )annotationsN)IO   )Image)	deprecate)PIL._imagingPILLOW_VERSION)zPIL._tkinter_finder
tk_version)PIL._imagingftfreetype2_version)zPIL._imagingcmslittlecms_version)	PIL._webpwebpdecoder_version)z	PIL._aviflibavif_version)piltkinter	freetype2
littlecms2webpavifc                    U [         ;  a  SU  3n[        U5      e[         U    u  p# [        U5        g! [         a     g[         a)  n[
        R                  " [        U5      5         SnAgSnAff = f)z
Checks if a module is available.

:param feature: The module to check for.
:returns: ``True`` if available, ``False`` otherwise.
:raises ValueError: If the module is not defined in this version of Pillow.
zUnknown module TFN)modules
ValueError
__import__ModuleNotFoundErrorImportErrorwarningswarnstr)featuremsgmoduleverexs        >/var/www/html/env/lib/python3.13/site-packages/PIL/features.pycheck_moduler&      sl     gy)o'"KF6  c"gs   3 
A1	A1A,,A1c                b    [        U 5      (       d  g[        U    u  p[        [        X/S9U5      $ )z
:param feature: The module to check for.
:returns:
    The loaded version number as a string, or ``None`` if unknown or not available.
:raises ValueError: If the module is not defined in this version of Pillow.
Nfromlist)r&   r   getattrr   )r    r"   r#   s      r%   version_moduler+   0   s2       '"KF:fu5s;;    c                 ^    [          V s/ s H  n [        U 5      (       d  M  U PM     sn $ s  sn f )z,
:returns: A list of all supported modules.
)r   r&   fs    r%   get_supported_modulesr0   ?   s"     2w!,q/Aw222   **)jpegjpeglib)jpeg2kjp2klib)zipzlib)libtiffr8   )jpgjpg_2000r7   r8   c                    U [         ;  a  SU  3n[        U5      e[         U    u  p#U S3[        [        R                  5      ;   $ )z
Checks if a codec is available.

:param feature: The codec to check for.
:returns: ``True`` if available, ``False`` otherwise.
:raises ValueError: If the codec is not defined in this version of Pillow.
zUnknown codec _encoder)codecsr   dirr   core)r    r!   codeclibs       r%   check_codecrB   N   sG     fwi(oJEWHUZZ00r,   c                    [        U 5      (       d  g[        U    u  p[        [        R                  U S35      nU S:X  a&  UR                  S5      S   R                  S5      S   $ U$ )z
:param feature: The codec to check for.
:returns:
    The version number as a string, or ``None`` if not available.
    Checked at compile time for ``jpg``, run-time otherwise.
:raises ValueError: If the codec is not defined in this version of Pillow.
N_versionr8   
r   zVersion r   )rB   r=   r*   r   r?   split)r    r@   rA   versions       r%   version_codecrH   _   se     wJEejjSE"23G)}}T"1%++J7::Nr,   c                 ^    [          V s/ s H  n [        U 5      (       d  M  U PM     sn $ s  sn f )z+
:returns: A list of all supported codecs.
)r=   rB   r.   s    r%   get_supported_codecsrJ   t   s"     0v!QAv000r1   )r   TN)r   	HAVE_RAQMraqm_version)r   HAVE_FRIBIDIfribidi_version)r   HAVE_HARFBUZZharfbuzz_version)r   HAVE_LIBJPEGTURBOlibjpeg_turbo_version)r   HAVE_MOZJPEGrR   )r   HAVE_ZLIBNGzlib_ng_version)r   HAVE_LIBIMAGEQUANTimagequant_version)r   HAVE_XCBN)	webp_animwebp_muxtransp_webpraqmfribidiharfbuzzlibjpeg_turbomozjpegzlib_nglibimagequantxcbz-dict[str, tuple[str, str | bool, str | None]]featuresc                v   U [         ;  a  SU  3n[        U5      e[         U    u  p#n[        U[        5      (       a  [	        SU  S3S5         [        US/S9n[        U[        5      (       a  U$ [        XS5      $ ! [         a     g[         a)  n[        R                  " [        U5      5         SnAgSnAff = f)z
Checks if a feature is available.

:param feature: The feature to check for.
:returns: ``True`` if available, ``False`` if unavailable, ``None`` if unknown.
:raises ValueError: If the feature is not defined in this version of Pillow.
zUnknown feature zcheck_feature("z")   PILr(   N)rd   r   
isinstanceboolr   r   r*   r   r   r   r   r   )r    r!   r"   flagr#   imported_moduler$   s          r%   check_featurerl      s     h 	*o )F#$OG9B/4	$Vug>dD!!K--  c"gs$   !A: /
A: :
B8	B8B33B8c                l    [        U 5      (       d  g[        U    u  pnUc  g[        [        X/S9U5      $ )z
:param feature: The feature to check for.
:returns: The version number as a string, or ``None`` if not available.
:raises ValueError: If the feature is not defined in this version of Pillow.
Nr(   )rl   rd   r*   r   )r    r"   rj   r#   s       r%   version_featurern      s=     !! )F#
{:fu5s;;r,   c                 2   / n [         R                  5        H|  u  nu  p#nUSL aK  [        R                  5        H1  u  nu  pdXb:X  d  M  [        U5      (       a  U R	                  U5          MU     MY  [        U5      (       d  Mk  U R	                  U5        M~     U $ )z-
:returns: A list of all supported features.
T)rd   itemsr   r&   appendrl   )supported_featuresr/   r"   rj   _r    feature_modules          r%   get_supported_featuresru      s      ( 0F!4<07,,.!+#G,,*11!4	 1@
 1%%a( !1 r,   c                    U [         ;   a  [        U 5      $ U [        ;   a  [        U 5      $ U [        ;   a  [        U 5      $ [        R                  " SU  S3SS9  g)z
:param feature: A module, codec, or feature name.
:returns:
    ``True`` if the module, codec, or feature is available,
    ``False`` or ``None`` otherwise.
zUnknown feature 'z'.   )
stacklevelF)r   r&   r=   rB   rd   rl   r   r   r    s    r%   checkrz      sX     'G$$&7##(W%%MM%gYb1a@r,   c                    U [         ;   a  [        U 5      $ U [        ;   a  [        U 5      $ U [        ;   a  [        U 5      $ g)z
:param feature:
    The module, codec, or feature to check for.
:returns:
    The version number as a string, or ``None`` if unknown or not available.
N)r   r+   r=   rH   rd   rn   ry   s    r%   rG   rG      s@     'g&&&W%%(w''r,   c                 ~    [        5       n U R                  [        5       5        U R                  [        5       5        U $ )zB
:returns: A list of all supported modules, features, and codecs.
)r0   extendru   rJ   )rets    r%   get_supportedr      s1    
  
!CJJ%'(JJ#%&Jr,   c                n	   U c  [         R                  n [        R                  " 5         [	        SU S9  [	        S[
        R                   3U S9  [         R                  R                  5       n[	        SUS   R                  5        3U S9  USS  H  n[	        SUR                  5        3U S9  M      [	        SU S9  [	        S	[         R                  =(       d    S
 3U S9  [         R                  [         R                  :w  a  [	        S[         R                   3U S9  [	        S[         R                   3U S9  [	        SU S9  [	        S[        R                  R                  [        R                   5       3U S9  [	        S[        R                  R                  [        R"                  R                   5       3U S9  [	        SU S9  S GH  u  pE[%        U5      (       a  SnUS:X  a*  ['        S5      nUb  [)        S5      (       a  SOSnUSU-   -  nUc  [        U5      nUb  US;   nUS:X  a$  [+        S UR-                  S5       5       5      S:  nU(       a  SOSn	US:X  a  ['        S5      n
U
b  USU
-   -  nO*US:X  a$  S  H  n['        U5      nUc  M  US!U SU 3-  nM      [	        S"US#XU S9  M  [	        S"US$U S9  M  [	        S%US&U S9  GM     [	        SU S9  U(       Ga  [.        R0                  " [2        5      n[        R4                  R7                  5        H  u  pX   R9                  U5        M     [;        [        R<                  5       GHb  nU nU[        R>                  ;   a  U S[        R>                  U    3n[	        UU S9  X;   a3  [	        S'RA                  S!RC                  [;        X   5      5      5      U S9  / nU[        RD                  ;   a  UR9                  S(5        U[        RF                  ;   a  UR9                  S)5        U[        RH                  ;   a  UR9                  S*5        U[        RJ                  ;   a  UR9                  S+5        U[        RL                  ;   a  UR9                  S,5        [	        S-RA                  S!RC                  U5      5      U S9  [	        SU S9  GMe     gg).a  
Prints information about this installation of Pillow.
This function can be called with ``python3 -m PIL``.
It can also be called with ``python3 -m PIL.report`` or ``python3 -m PIL --report``
to have "supported_formats" set to ``False``, omitting the list of all supported
image file formats.

:param out:
    The output stream to print to. Defaults to ``sys.stdout`` if ``None``.
:param supported_formats:
    If ``True``, a list of all supported image file formats will be printed.
NzD--------------------------------------------------------------------)filezPillow zPython r   r   z       zPython executable is unknownz%Environment Python files loaded from z System Python files loaded from z"Python Pillow modules loaded from z"Binary Pillow modules loaded from ))r   zPIL CORE)r   TKINTER)r   	FREETYPE2)r   
LITTLECMS2)r   WEBP)r   AVIF)r9   JPEG)r:   zOPENJPEG (JPEG2000))r7   zZLIB (PNG/ZIP))r8   LIBTIFF)r\   zRAQM (Bidirectional Text))rb   z#LIBIMAGEQUANT (Quantization method))rc   zXCB (X protocol)r9   r_   r`   zlibjpeg-turbo )r   r9   r   c              3  8   #    U  H  n[        U5      v   M     g 7f)N)int).0xs     r%   	<genexpr>pilinfo.<locals>.<genexpr>:  s     *H<a3q66<s   .)rw      zcompiled forloadedr7   ra   z, compiled for zlib-ng r\   )r]   r^   z, z---zsupport ok,z
support okz***zsupport not installedzExtensions: {}opensavesave_alldecodeencodezFeatures: {})'sysstdoutr   initprintrg   __version__rG   
splitlinesstrip
executableprefixbase_prefixospathdirname__file__r?   rz   rn   rl   tuplerF   collectionsdefaultdictlist	EXTENSIONrp   rq   sortedIDMIMEformatjoinOPENSAVESAVE_ALLDECODERSENCODERS)outsupported_formatspy_version_lines
py_versionnamer    vrR   version_statictrU   r/   v2
extensionsextilinerd   s                     r%   pilinfor      s    {jj	JJL	(	GCOO$
%C0{{--/	G$Q'--/0
1<&qr*

((*+,37 +	(	!#.."=I!>
?cJ
zzS__$5cjj\BM	,S__,=
>SI	(	
,RWW__U^^-L,MN 

,RWW__UZZ=P=P-Q,RS 
( ;; Au}(7(H%(4%29%=%=	?A444AyDM}!%!7<'%**H1773<*H%H6%QN&4N(6>&5i&@O&26HHV^4,Q/>2aS".A 5 eWmQDeWl=%"9DWX 
( ,,T2
oo++-FCM  % . !ASDEJJqA0$S!$++DIIfZ]6K,LMTW HEJJ'EJJ'ENN"
+ENN")ENN").''		((;<3G(%1 " r,   )r    r   returnri   )r    r   r   z
str | None)r   z	list[str])r    r   r   zbool | None)NT)r   zIO[str] | Noner   ri   r   None)
__future__r   r   r   r   r   typingr   rg    r   
_deprecater   r   r&   r+   r0   r=   rB   rH   rJ   rd   __annotations__rl   rn   ru   rz   rG   r   r    r,   r%   <module>r      s    "  	 
   
  ! .48:0,0<3 %%	
1"*1 +),;DGSHAQ-;
7 8<""$ t&r,   