HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/PIL/__pycache__/GdImageFile.cpython-38.pyc
U

g�
^9	�@sHddlmZmZmZddlmZmZmZ	Gdd�dej�Z
d	dd�ZdS)
�)�	ImageFile�ImagePalette�UnidentifiedImageError)�i8�i16be�i32bec@seZdZdZdZdd�ZdS)�GdImageFileZGDzGD uncompressed imagescCs�|j�d�}t|dd��dkr(td��d|_t|dd��t|dd��f|_t|d�}|rddnd}t|d	|d	|d��}|d
kr�||jd<t	�
d|d	|dd	|dd
��|_dd|jd	|dd
dfg|_
dS)Ni
�)i��i��zNot a valid GD 2.x .gd file�L�����ZtransparencyZXBGRi�raw)r
r
)r
r
r)�fp�read�i16�SyntaxError�modeZ_sizer�i32�inforrZpalette�sizeZtile)�self�sZ	trueColorZtrueColorOffsetZtindex�r�1/usr/lib/python3/dist-packages/PIL/GdImageFile.py�_open)s "
��zGdImageFile._openN)�__name__�
__module__�__qualname__�formatZformat_descriptionrrrrrr$sr�rcCs<|dkrtd��z
t|�WStk
r6td��YnXdS)a)
    Load texture from a GD image file.

    :param filename: 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 IOError: If the image could not be read.
    r"zbad modezcannot identify this image fileN)�
ValueErrorrrr)rrrrr�openEs

r$N)r")�rrrZ_binaryrrrrrrr$rrrr�<module>s	!