Sindbad~EG File Manager

Current Path : /proc/2191876/root/usr/local/lib/python3.12/site-packages/PIL/__pycache__/
Upload File :
Current File : //proc/2191876/root/usr/local/lib/python3.12/site-packages/PIL/__pycache__/features.cpython-312.pyc

�

&ٜg�+��
�UddlmZddlZddlZddlZddlZddlmZddlZddl	m
Z
ddlmZddd	d
dd�Z
d*d
�Zd+d�Zd,d�Zddddd�Zd*d�Zd+d�Zd,d�Zddddddddddd �
Zd!ed"<d-d#�Zd+d$�Zd,d%�Zd-d&�Zd+d'�Zd,d(�Zd.d/d)�Zy)0�)�annotationsN)�IO�)�Image)�	deprecate)�PIL._imaging�PILLOW_VERSION)zPIL._tkinter_finder�
tk_version)�PIL._imagingft�freetype2_version)zPIL._imagingcms�littlecms_version)�	PIL._webp�webpdecoder_version)�pil�tkinter�	freetype2�
littlecms2�webpc���|tvrd|��}t|��t|\}}	t|�y#t$rYyt$r(}tjt|��Yd}~yd}~wwxYw)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.
    zUnknown module TFN)�modules�
ValueError�
__import__�ModuleNotFoundError�ImportError�warnings�warn�str)�feature�msg�module�ver�exs     �7/usr/local/lib/python3.12/site-packages/PIL/features.py�check_moduler$sn���g����y�)����o���'�"�K�F�C���6����������
�
�c�"�g�����s�2�	A-�A-�A(�(A-c�b�t|�syt|\}}tt||g��|�S)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)rr r!s   r#�version_moduler)/s3���� ���'�"�K�F�C��:�f��u�5�s�;�;�c�L�tD�cgc]}t|�s�|��c}Scc}w)z4
    :returns: A list of all supported modules.
    )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��|tvrd|��}t|��t|\}}|�d�ttj�vS)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.
    zUnknown codec �_encoder)�codecsr�dirr�core)rr�codec�libs    r#�check_codecr@MsI���f���w�i�(����o�����J�E�3��W�H���U�Z�Z��0�0r*c���t|�syt|\}}ttj|�d��}|dk(r&|jd�djd�dS|S)a
    :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�_versionr6�
rzVersion r)r@r;r(rr=�split)rr>r?�versions    r#�
version_codecrF^sd���w������J�E�3��e�j�j�S�E��"2�3�G��)���}�}�T�"�1�%�+�+�J�7��:�:��Nr*c�L�tD�cgc]}t|�s�|��c}Scc}w)z3
    :returns: A list of all supported codecs.
    )r;r@r,s r#�get_supported_codecsrHss"���0�v�!��Q��A�v�0�0��0r/)rTN)r�	HAVE_RAQM�raqm_version)r�HAVE_FRIBIDI�fribidi_version)r�
HAVE_HARFBUZZ�harfbuzz_version)r�HAVE_LIBJPEGTURBO�libjpeg_turbo_version)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�zlib_ng�
libimagequant�xcbz-dict[str, tuple[str, str | bool, str | None]]�featuresc�b�|tvrd|��}t|��t|\}}}t|t�rt	d|�d�d�	t|dg��}t|t�r|St
||�S#t$rYyt$r(}tjt|��Yd}~yd}~wwxYw)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.
    zUnknown feature zcheck_feature("z")��PILr&N)r`r�
isinstance�boolrrr(rrrrr)rrr �flagr!�imported_moduler"s       r#�
check_featurerh�s����h�� ��	�*����o�� ��)��F�D�#��$����O�G�9�B�/��4�	�$�V�u�g�>���d�D�!��K����-�-��������
�
�c�"�g�����s$�A3�'A3�3	B.�>B.�B)�)B.c�j�t|�syt|\}}}|�ytt||g��|�S)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&)rhr`r(r)rr rfr!s    r#�version_featurerj�s>����!�� ��)��F�D�#�
�{���:�f��u�5�s�;�;r*c��g}tj�D]m\}\}}}|durCtj�D]+\}\}}||k(s�t|�r|j	|��O�Qt|�s�]|j	|��o|S)z5
    :returns: A list of all supported features.
    T)r`�itemsrr$�appendrh)�supported_featuresr-r rf�_r�feature_modules       r#�get_supported_featuresrq�s����� (��� 0����F�D�!��4�<�07�
�
��,��,�.�!�!�V�+�#�G�,�*�1�1�!�4��	1@�
�1�
��%�%�a�(�!1��r*c��|tvrt|�S|tvrt|�S|tvrt|�St
jd|�d�d��y)z�
    :param feature: A module, codec, or feature name.
    :returns:
        ``True`` if the module, codec, or feature is available,
        ``False`` or ``None`` otherwise.
    zUnknown feature 'z'.�)�
stacklevelF)rr$r;r@r`rhrr�rs r#�checkrv�sX���'���G�$�$��&���7�#�#��(���W�%�%��M�M�%�g�Y�b�1�a�@�r*c�v�|tvrt|�S|tvrt|�S|tvrt|�Sy)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)rr)r;rFr`rjrus r#rErE�s@���'���g�&�&��&���W�%�%��(���w�'�'�r*c�~�t�}|jt��|jt��|S)zJ
    :returns: A list of all supported modules, features, and codecs.
    )r.�extendrqrH)�rets r#�
get_supportedr{�s1��
 �
!�C��J�J�%�'�(��J�J�#�%�&��Jr*c�F	�|�tj}tj�t	d|��t	dt
j��|��tjj�}t	d|dj���|��|ddD] }t	d|j���|���"t	d|��t	d	tjxsd
��|��tjtjk7rt	dtj��|��t	dtj��|��t	d|��t	d
tjjtj ���|��t	dtjjtj"j ���|��t	d|��dD]�\}}t%|�r�d}|dk(rt'd�}|�d|z}|�t|�}|��|dv}|dk(r$t)d�|j+d�D��dk}|rdnd}	|dk(rt'd�}
|
�.|d|
zz
}n%|dk(r dD]}t'|�}|��|d|�d |��z
}�t	d!|d"|	||����t	d!|d#|����t	d$|d%|����t	d|��|�r�t-j.t0�}
tj2j5�D]\}}|
|j7|��t9tj:�D�]a}|�}|tj<vr|�d tj<|��}t	||��||
vr7t	d&j?djAt9|
|���|��g}|tjBvr|j7d'�|tjDvr|j7d(�|tjFvr|j7d)�|tjHvr|j7d*�|tjJvr|j7d+�t	d,j?djA|��|��t	d|����dyy)-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--------------------------------------------------------------------)�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�
LITTLECMS2)r�WEBP)r7�JPEG)r8zOPENJPEG (JPEG2000))r5zZLIB (PNG/ZIP))r6�LIBTIFF)rYzRAQM (Bidirectional Text))r^z#LIBIMAGEQUANT (Quantization method))r_zXCB (X protocol)r7r\zlibjpeg-turbo )rr7rc3�2K�|]}t|����y�w)N)�int)�.0�xs  r#�	<genexpr>zpilinfo.<locals>.<genexpr>6s����*H�<�a�3�q�6�<�s��.)rs�zcompiled for�loadedr5r]z, compiled for zlib-ng rY)rZr[z, � z---zsupport ok,z
support okz***zsupport not installedzExtensions: {}�open�save�save_all�decode�encodezFeatures: {})&�sys�stdoutr�init�printrc�__version__rE�
splitlines�strip�
executable�prefix�base_prefix�os�path�dirname�__file__r=rvrj�tuplerD�collections�defaultdict�list�	EXTENSIONrlrm�sorted�ID�MIME�format�join�OPEN�SAVE�SAVE_ALL�DECODERS�ENCODERS)�out�supported_formats�py_version_lines�
py_version�namer�vrP�version_static�trRr-�v2�
extensions�ext�i�liner`s                  r#�pilinfor��s����{��j�j��	�J�J�L�	�(���	�G�C�O�O�$�
%�C�0��{�{�-�-�/��	�G�$�Q�'�-�-�/�0�
1��<�&�q�r�*�
�
��
�(�(�*�+�,�3�7�+�	�(���	�!�#�.�.�"=�I�!>�
?�c�J�
�z�z�S�_�_�$�
�5�c�j�j�\�B��M�	�,�S�_�_�,=�
>�S�I�	�(���	�
,�R�W�W�_�_�U�^�^�-L�,M�N�
��
�
,�R�W�W�_�_�U�Z�Z�=P�=P�-Q�,R�S�
��
�(���
�
��g���;� �A��u�}�(7��(H�%�(�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�S
�T
�(���� �,�,�T�2�
��o�o�+�+�-�F�C���q�M� � ��%�.�����!�A��S�D��E�J�J����q����A���0���$�S�!��J���$�+�+�D�I�I�f�Z��]�6K�,L�M�TW���H��E�J�J������'��E�J�J������'��E�N�N�"����
�+��E�N�N�"�����)��E�N�N�"�����)��.�'�'��	�	�(�(;�<�3�G��(��%�1"�r*)rr�returnre)rrr�z
str | None)r�z	list[str])rrr�zbool | None)NT)r�zIO[str] | Noner�rer��None)�
__future__rr�r�r�r�typingrrc�r�
_deprecaterrr$r)r.r;r@rFrHr`�__annotations__rhrjrqrvrEr{r��r*r#�<module>r�s���"��	�
���
��!�.�4�8�:�0����0<�3��%��%�	
��1�"�*1�+�)�,�;�D�G�S�A�Q�-�;��
7���8<�"�"�$
� �r&r*

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists