Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
features.cpython-313.pyc115 linesDownload Raw Back to __pycache__
1�

2v�jn+�	��%SSKJr SSKrSSKrSSKrSSKrSSKJr SSKrSSK	J3r4 SSSS	S5SS.rS*S
jrS+Sjr
S,SjrSSSSS.rS*SjrS+SjrS,SjrSSSSSSSSS .rS!\S"'S-S#jrS+S$jrS,S%jrS-S&jrS+S'jrS,S(jrS.S/S)jjrg)0�)�annotationsN)�IO�)�Image)�PIL._imaging�PILLOW_VERSION)zPIL._tkinter_finder�6tk_version)�PIL._imagingft�freetype2_version)zPIL._imagingcms�littlecms_version)z	PIL._webp�webpdecoder_version)z	PIL._avif�libavif_version)�pil�tkinter�	freetype2�7littlecms2�webp�avifc���U[;aSU3n[U5e[Uup#[U5 g![a g[a)n[8R"[U55 SnAgSnAff=f)z�9Checks if a module is available.10 11:param feature: The module to check for.12:returns: ``True`` if available, ``False`` otherwise.13:raises ValueError: If the module is not defined in this version of Pillow.14zUnknown module TFN)�modules�15ValueError�16__import__�ModuleNotFoundError�ImportError�warnings�warn�str)�feature�msg�module�ver�exs     �RD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/features.py�check_moduler$sl���g����y�)����o���'�"�K�F���6����������
�
�c�"�g�����s�3�17A1�	A1�A,�,A1c�b�[U5(dg[Uup[[X/S9U5$)z�18:param feature: The module to check for.19:returns:20    The loaded version number as a string, or ``None`` if unknown or not available.21:raises ValueError: If the module is not defined in this version of Pillow.22N��fromlist)r$r�getattrr)rr r!s   r#�version_moduler)/s2���� � ���'�"�K�F��:�f�u�5�s�;�;�c�^�[Vs/sHn[U5(dMUPM sn$s snf)z,23:returns: A list of all supported modules.24)rr$��fs r#�get_supported_modulesr.>s"���2�w�!�,�q�/�A�w�2�2��2��*�*)�jpeg�jpeglib)�jpeg2k�jp2klib)�zip�zlib)�libtiffr6)�jpg�jpg_2000r5r6c��U[;aSU3n[U5e[Uup#US3[[R5;$)z�25Checks if a codec is available.26 27:param feature: The codec to check for.28:returns: ``True`` if available, ``False`` otherwise.29:raises ValueError: If the codec is not defined in this version of Pillow.30zUnknown codec �_encoder)�codecsr�dirr�core)rr�codec�libs    r#�check_codecr@MsG���f���w�i�(����o�����J�E��W�H���U�Z�Z��0�0r*c���[U5(dg[Uup[[RUS35nUS:Xa&URS5SRS5S$U$)z�31:param feature: The codec to check for.32:returns:33    The version number as a string, or ``None`` if not available.34    Checked at compile time for ``jpg``, run-time otherwise.35:raises ValueError: If the codec is not defined in this version of Pillow.36N�_versionr6�37rzVersion r)r@r;r(rr=�split)rr>r?�versions    r#�
version_codecrF^se���w�������J�E��e�j�j�S�E��"2�3�G��)���}�}�T�"�1�%�+�+�J�7��:�:��Nr*c�^�[Vs/sHn[U5(dMUPM sn$s snf)z+38:returns: A list of all supported codecs.39)r;r@r,s r#�get_supported_codecsrHss"���0�v�!��Q��A�v�0�0��0r/)r40�	HAVE_RAQM�raqm_version)r41�HAVE_FRIBIDI�fribidi_version)r42�
HAVE_HARFBUZZ�harfbuzz_version)r�HAVE_LIBJPEGTURBO�libjpeg_turbo_version)r�HAVE_MOZJPEGrP)r�HAVE_ZLIBNG�zlib_ng_version)r�HAVE_LIBIMAGEQUANT�imagequant_version)r�HAVE_XCBN)�raqm�fribidi�harfbuzz�
libjpeg_turbo�mozjpeg�zlib_ng�
libimagequant�xcbz&dict[str, tuple[str, str, str | None]]�featuresc���U[;aSU3n[U5e[Uup#n[US/S9n[XS5$![a g[43a)n[R"[U55 SnAgSnAff=f)z�44Checks if a feature is available.45 46:param feature: The feature to check for.47:returns: ``True`` if available, ``False`` if unavailable, ``None`` if unknown.48:raises ValueError: If the feature is not defined in this version of Pillow.49zUnknown feature �PILr&N)	r_rrr(rrrrr)rrr �flagr!�imported_moduler"s       r#�
check_featurerd�s}���h�� ��	�*����o�� ��)��F�#��$�V�u�g�>����-�-��������
�
�c�"�g�����s�>�50A<�51	A<�A7�7A<c�l�[U5(dg[UupnUcg[[X/S9U5$)z�52:param feature: The feature to check for.53:returns: The version number as a string, or ``None`` if not available.54:raises ValueError: If the feature is not defined in this version of Pillow.55Nr&)rdr_r(r)rr rbr!s    r#�version_featurerf�s=����!�!�� ��)��F�#�56�{���:�f�u�5�s�;�;r*c�^�[Vs/sHn[U5(dMUPM sn$s snf)z-57:returns: A list of all supported features.58)r_rdr,s r#�get_supported_featuresrh�s#�� �4�x�!�=��#3�A�x�4�4��4r/c��U[;a[U5$U[;a[U5$U[;a[U5$[R"SUS3SS9 g)z�59:param feature: A module, codec, or feature name.60:returns:61    ``True`` if the module, codec, or feature is available,62    ``False`` or ``None`` otherwise.63zUnknown feature 'z'.�)�64stacklevelF)rr$r;r@r_rdrr�rs r#�checkrm�sX���'���G�$�$��&���7�#�#��(���W�%�%��M�M�%�g�Y�b�1�a�@�r*c��U[;a[U5$U[;a[U5$U[;a[U5$g)z�65:param feature:66    The module, codec, or feature to check for.67:returns:68    The version number as a string, or ``None`` if unknown or not available.69N)rr)r;rFr_rfrls r#rErE�s@���'���g�&�&��&���W�%�%��(���w�'�'�r*c�~�[5nUR[55 UR[55 U$)zB70:returns: A list of all supported modules, features, and codecs.71)r.�extendrhrH)�rets r#�
get_supportedrr�s1��72 �73!�C��J�J�%�'�(��J�J�#�%�&��Jr*c�n	�Uc[Rn[R"5 [	SUS9 [	S[74R3US9 [RR5n[	SUSR53US9 USSHn[	SUR53US9 M  [	SUS9 [	S	[R=(d S753US9 [R[R:wa[	S[R3US9 [	S[R3US9 [	SUS9 [	S
[RR[R 53US9 [	S[RR[R"R 53US9 [	SUS9 SGHupE[%U5(a�SnUS:Xa*['S5nUb[)S5(aSOSnUSU--
nUc[U5nUb�US;nUS:Xa$[+SUR-S555S:nU(aSOSn	US:Xa['S5n76U77bUSU78--
nO*US:Xa$S Hn['U5nUcMUS!USU3-
nM  [	S"US#X�US9 M�[	S"US$US9 M�[	S%US&US9 GM [	SUS9 U(Ga�[.R0"[25n
[R4R75Hup�X�R9U5 M [;[R<5GHbnUnU[R>;aUS[R>U3n[	UUS9 X�;a3[	S'RAS!RC[;X�555US9 /nU[RD;aUR9S(5 U[RF;aUR9S)5 U[RH;aUR9S*5 U[RJ;aUR9S+5 U[RL;aUR9S,5 [	S-RAS!RCU55US9 [	SUS9 GMe gg).a�79Prints information about this installation of Pillow.80This function can be called with ``python3 -m PIL``.81It can also be called with ``python3 -m PIL.report`` or ``python3 -m PIL --report``82to have "supported_formats" set to ``False``, omitting the list of all supported83image file formats.84 85:param out:86    The output stream to print to. Defaults to ``sys.stdout`` if ``None``.87:param supported_formats:88    If ``True``, a list of all supported image file formats will be printed.89NzD--------------------------------------------------------------------)�filezPillow zPython rrz       zPython 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 )
)rzPIL CORE)r�TKINTER)r�	FREETYPE2)r�90LITTLECMS2)r�WEBP)r�AVIF)r7�JPEG)r8zOPENJPEG (JPEG2000))r5zZLIB (PNG/ZIP))r6�LIBTIFF)rWzRAQM (Bidirectional Text))r]z#LIBIMAGEQUANT (Quantization method))r^zXCB (X protocol)r7rZr[z
libjpeg-turbo� )rr7rc3�8# �UHn[U5v� M g7f)N)�int)�.0�xs  r#�	<genexpr>�pilinfo.<locals>.<genexpr>(s���*H�<�a�3�q�6�6�<�s��.)rj�zcompiled for�loadedr5r\z, compiled for zlib-ng rW)rXrYz, z---zsupport ok,z91support okz***zsupport not installedzExtensions: {}�open�save�save_all�decode�encodezFeatures: {})'�sys�stdoutr�init�printra�__version__rE�92splitlines�strip�93executable�prefix�base_prefix�os�path�dirname�__file__r=rmrfrd�tuplerD�collections�defaultdict�list�	EXTENSION�items�append�sorted�ID�MIME�format�join�OPEN�SAVE�SAVE_ALL�DECODERS�ENCODERS)�out�supported_formats�py_version_lines�94py_version�namer�vrP�version_static�trSr-�v2�95extensions�ext�i�liner_s                  r#�pilinfor��s���{��j�j��	�J�J�L�	�(���	�G�C�O�O�$�96%�C�0��{�{�-�-�/��	�G�$�Q�'�-�-�/�0�971��<�&�q�r�*�98�
��99�(�(�*�+�,�3�7�+�	�(���	�!�#�.�.�"=�I�!>�100?�c�J�101�z�z�S�_�_�$�
�5�c�j�j�\�B��M�	�,�S�_�_�,=�102>�S�I�	�(���	�103,�R�W�W�_�_�U�^�^�-L�,M�N�
��104�105,�R�W�W�_�_�U�Z�Z�=P�=P�-Q�,R�S�
��106�(����
����;�;� �A��u�}�(7��(H�%�(�4�%2�9�%=�%=�	�?�A���4�4�4�A��y��D�M���}�!%��!7���<�'�%*�*H�1�7�7�3�<�*H�%H�6�%Q�N�&4�N�(���6�>�&5�i�&@�O�&�2��6��H�H����V�^�4��,�Q�/���>��2�a�S��"���.�A�5��e�W�m�Q��D��e�W�l��=��%��"9��D�W�X107�(���� �,�,�T�2�108��o�o�+�+�-�F�C��M� � ��%�.�����!�A��S�D��E�J�J����q����A���0���$�S�!����$�+�+�D�I�I�f�Z�]�6K�,L�M�TW���H��E�J�J������'��E�J�J������'��E�N�N�"����109�+��E�N�N�"�����)��E�N�N�"�����)��.�'�'��	�	�(�(;�<�3�G��(��%�1"�r*)rr�return�bool)rrr�z110str | None)r�z	list[str])rrr�zbool | None)NT)r�zIO[str] | Noner�r�r��None)�111__future__rr�r�r�r�typingrra�rrr$r)r.r;r@rFrHr_�__annotations__rdrfrhrmrErrr��r*r#�<module>r�s���"��	�112���113��.�4�8�:�0�,�
���0<�3��%��%�	114��1�"�*1�
<�D�G�S�H�A�Q�-�	4��1150�	��0<�"5��$
� �t&r*
codekingpro/portable-devtools · Team Ai