Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2v�jL���SrSSKJr SSKJr SSKJrJrJr SSK	J3r SSK	Jr
 SSKJr "S	S4\R5rS
SSjjrg)a�5.. note::6    This format cannot be automatically recognized, so the7    class is not registered for use with :py:func:`PIL.Image.open()`.  To open a8    gd file, use the :py:func:`PIL.GdImageFile.open()` function instead.9 10.. warning::11    THE GD FORMAT IS NOT DESIGNED FOR DATA INTERCHANGE.  This12    implementation is provided for convenience and demonstrational13    purposes only.14�)�annotations)�IO�)�	ImageFile�ImagePalette�UnidentifiedImageError)�i16be)�i32be)�StrOrBytesPathc�*�\rSrSrSrSrSrSSjrSrg)	�GdImageFile�'a15Image plugin for the GD uncompressed format.  Note that this format16is not supported by the standard :py:func:`PIL.Image.open()` function.  To use17this plugin, you have to import the :py:mod:`PIL.GdImageFile` module and18use the :py:func:`PIL.GdImageFile.open()` function.19�GDzGD uncompressed imagesc��URceURRS5n[U5S;a
Sn[U5eSUl[US5[US54UlUSnU(aSOSn[
US	U-5nUS20:aXPRS'[R"SUS	U-S-S	U-S-S
-5Ul21[R"SSUR-S	U-S-S
-S5/Ulg)Ni
)i��i��zNot a valid GD 2.x .gd file�P���r���transparency�RGBXi�raw)rr�L)�fp�read�i16�SyntaxError�_mode�_size�i32�inforr�paletter�_Tile�size�tile)�self�s�msg�22true_color�true_color_offset�tindexs      �UD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/GdImageFile.py�_open�GdImageFile._open2s���w�w�"�"�"��G�G�L�L�����q�6��'�/�C��c�"�"���23���A�Y��A�q�	�)��24��q�T�25�!+�A����Q��-�-�.���C�<�(.�I�I�n�%�#�'�'��A�a�+�+�a�/�!�6G�2G�!�2K�g�2U�V�26���27
�O�O������"��%�%��)�G�3��	
�28��	�)rr r#r&N)�return�None)	�__name__�29__module__�__qualname__�__firstlineno__�__doc__�format�format_descriptionr.�__static_attributes__�r0r-r
r
's����F�1�� 30r0r
c��US:wa
Sn[U5e[U5$![anSn[U5UeSnAff=f)a31Load texture from a GD image file.32 33:param fp: GD file name, or an opened file handle.34:param mode: Optional mode.  In this version, if the mode argument35    is given, it must be "r".36:returns: An image instance.37:raises OSError: If the image could not be read.38�rzbad modezcannot identify this image fileN)�39ValueErrorr
rr)r�moder)�es    r-�openrAUsK���s�{�����o��1��2�����1�/��$�S�)�q�0��1�s�40 �41=�8�=N)r=)rzStrOrBytesPath | IO[bytes]r?�strr1r
)r7�42__future__r�typingr�rrr�_binaryr	rr43r!�_typingrr
rAr;r0r-�<module>rHs9��"44�#��=�=�!�!�#�+45�)�%�%�+46�\1r0
codekingpro/portable-devtools · Team Ai