%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/PIL/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/PIL/__pycache__/features.cpython-312.pyc

�

��e�%�
���ddlmZddlZddlZddlZddlZddlZddlmZddddd	d
�Z	d�Z
d�Zd
�Zddddd�Z
d�Zd�Zd�Zdddddddddd�	Zd �Zd!�Zd"�Zd#�Zd$�Zd%�Zd'd&�Zy)(�)�annotationsN�)�Image)�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     �./usr/lib/python3/dist-packages/PIL/features.py�check_moduler"sn���g����y�)����o���'�"�K�F�C���6����������
�
�c�"�g�����s�2�	A-�A-�A(�(A-c�h�t|�syt|\}}|�ytt||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)rrrs   r!�version_moduler'-s;���� ���'�"�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�!�,�q�/�A�2�2��2��!�!)�jpeg�jpeglib)�jpeg2k�jp2klib)�zip�zlib)�libtiffr4)�jpg�jpg_2000r3r4c��|tvrd|��}t|��t|\}}|dzttj�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>NsG���f���w�i�(����o�����J�E�3��:���U�Z�Z��0�0r(c���t|�syt|\}}ttj|dz�}|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�_versionr4�
rzVersion r)r>r9r&rr;�split)rr<r=�versions    r!�
version_codecrD_sb���w������J�E�3��e�j�j�#�
�"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.
    )r9r>r*s r!�get_supported_codecsrFts���0�!��Q��A�0�0��0r-)r�
HAVE_WEBPANIMN)r�HAVE_WEBPMUXN)r�HAVE_TRANSPARENCYN)r	�	HAVE_RAQM�raqm_version)r	�HAVE_FRIBIDI�fribidi_version)r	�
HAVE_HARFBUZZ�harfbuzz_version)r�HAVE_LIBJPEGTURBO�libjpeg_turbo_version)r�HAVE_LIBIMAGEQUANT�imagequant_version)r�HAVE_XCBN)	�	webp_anim�webp_mux�transp_webp�raqm�fribidi�harfbuzz�
libjpeg_turbo�
libimagequant�xcbc��|tvrd|��}t|��t|\}}}	t|dg��}t||�S#t$rYyt
$r(}t
jt|��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 �PILr$N)	�featuresrrr&rrrrr)rrr�flagr�imported_moduler s       r!�
check_featurerc�s����h�� ��	�*����o�� ��)��F�D�#��$�V�u�g�>�����-�-��������
�
�c�"�g�����s�A�	A<�A<�A7�7A<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$)rcr`r&r)rrrars    r!�version_featurere�s>����!�� ��)��F�D�#�
�{���:�f��u�5�s�;�;r(c�L�tD�cgc]}t|�s�|��c}Scc}w)z5
    :returns: A list of all supported features.
    )r`rcr*s r!�get_supported_featuresrg�s�� �4�!�=��#3�A�4�4��4r-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"r9r>r`rcrr�rs r!�checkrl�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'r9rDr`rerks r!rCrC�s@���'���g�&�&��&���W�%�%��(���w�'�'�r(c�~�t�}|jt��|jt��|S)zJ
    :returns: A list of all supported modules, features, and codecs.
    )r,�extendrgrF)�rets r!�
get_supportedrq�s1��
 �
!�C��J�J�%�'�(��J�J�#�%�&��Jr(c��|�tj}tj�t	d|��t	dt
j��|��tjj�}t	d|dj���|��|ddD] }t	d|j���|���"t	d|��t	d	tjjtj���|��t	d
tjjtjj���|��t	d|��dD]�\}}t|�r�|dk(rt!d
�rdt#d
�z}nt|�}|�j|dv}|dk(r$t%d�|j'd�D��dk}|rdnd}|dk(r dD]}t#|�}	|	��|d|�d|	��z
}�t	d|d|||����t	d|d|����t	d|d|����t	d|��|�r�t)j*t,�}
tj.j1�D]\}}|
|j3|��t5tj6�D�]a}|�}
|tj8vr|
�dtj8|��}
t	|
|��||
vr7t	dj;dj=t5|
|���|��g}|tj>vr|j3d �|tj@vr|j3d!�|tjBvr|j3d"�|tjDvr|j3d#�|tjFvr|j3d$�t	d%j;dj=|��|��t	d|����dyy)&aG
    Prints information about this installation of Pillow.
    This function can be called with ``python3 -m PIL``.

    :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 modules loaded from zBinary modules loaded from ))rzPIL CORE)r�TKINTER)r�	FREETYPE2)r�
LITTLECMS2)r�WEBP)rWzWEBP Transparency)rV�WEBPMUX)rUzWEBP Animation)r5�JPEG)r6zOPENJPEG (JPEG2000))r3zZLIB (PNG/ZIP))r4�LIBTIFF)rXzRAQM (Bidirectional Text))r\z#LIBIMAGEQUANT (Quantization method))r]zXCB (X protocol)r5r[zlibjpeg-turbo )rr5rc3�2K�|]}t|����y�w)N)�int)�.0�xs  r!�	<genexpr>zpilinfo.<locals>.<genexpr> s����*H�a�3�q�6�*H�s��.)ri�zcompiled for�loadedrX)rYrZz, � z---zsupport ok,z
support okz***zsupport not installedzExtensions: {}�open�save�save_all�decode�encodezFeatures: {})$�sys�stdoutr�init�printr_�__version__rC�
splitlines�strip�os�path�dirname�__file__r;rlrcre�tuplerB�collections�defaultdict�list�	EXTENSION�items�append�sorted�ID�MIME�format�join�OPEN�SAVE�SAVE_ALL�DECODERS�ENCODERS)�out�supported_formats�
py_version�namer�v�version_static�tr+�v2�
extensions�ext�i�liner`s               r!�pilinfor��st���{��j�j��	�J�J�L�	�(���	�G�C�O�O�$�
%�C�0����'�'�)�J�	�G�J�q�M�'�'�)�*�
+�#�6� ���n�8�
�
��
�(�(�*�+�,�3�7�8�	�(���	�
%�b�g�g�o�o�e�n�n�&E�%F�G�
��
�
%�b�g�g�o�o�e�j�j�6I�6I�&J�%K�L�
��
�(����%E�
��g�"��;��u�}���!?�$���'G�G���D�M���}�!%��!7���<�'�%*�*H�1�7�7�3�<�*H�%H�6�%Q�N�&4�N�(���6�>�4�/��,�Q�/���>��2�a�S��"���.�A�/��e�W�m�Q���D��e�W�l��=��%��"9��D�K%E�L
�(���� �,�,�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()NT)�
__future__rr�r�r�rr_�rrr"r'r,r9r>rDrFr`rcrergrlrCrqr��r(r!�<module>r�s���"��	�
��
��.�4�8�:�0����0<�$3��%��%�	
��1�"�*1�6�3�;�;�D�G�S�Q�-�
���0<�"5��$
� �f&r(

Zerion Mini Shell 1.0