
    (ph                        S SK Jr  SSKJrJr  SSKJr  S
S jr " S S\R                  5      r	\R                  " \	R                  \	\5        \R                  " \	R                  S5        g	)    )annotations   )Image	ImageFile)i32bec                v    [        U 5      S:  =(       a%    [        U S5      S:  =(       a    [        U S5      S;   $ )N   r         r      )leni32)prefixs    E/var/www/html/venv/lib/python3.13/site-packages/PIL/GbrImagePlugin.py_acceptr       s1    v;!QFA" 4QVQ69QQ    c                  ,    \ rS rSrSrSrSS jrS rSrg)	GbrImageFile(   GBRzGIMP brush filec                   [        U R                  R                  S5      5      nUS:  a  Sn[        U5      e[        U R                  R                  S5      5      nUS;  a  SU 3n[        U5      e[        U R                  R                  S5      5      n[        U R                  R                  S5      5      n[        U R                  R                  S5      5      nUS::  d  US::  a  Sn[        U5      eUS;  a  SU 3n[        U5      eUS	:X  a  US-
  nOdUS
-
  nU R                  R                  S5      nUS:w  a  Sn[        U5      e[        U R                  R                  S5      5      U R                  S'   U R                  R                  U5      S S n	US	:X  a  SU l        OSU l        XE4U l        XR                  S'   [        R                  " U R                  5        XE-  U-  U l
        g )Nr   r
   znot a GIMP brushr   z Unsupported GIMP brush version: r   )r   r   z$Unsupported GIMP brush color depth: r      s   GIMPz"not a GIMP brush, bad magic numberspacingLRGBAcomment)r   fpreadSyntaxErrorinfo_mode_sizer   _decompression_bomb_checksize
_data_size)
selfheader_sizemsgversionwidthheightcolor_depthcomment_lengthmagic_numberr   s
             r   _openGbrImageFile._open,   s   $'',,q/*$Cc""dggll1o&& 4WI>Cc""DGGLLO$TWW\\!_%$'',,q/*A:1$Cc""f$8FCc""a<(2-N(2-N77<<?Lw&:!#&&#&tww||A#7DIIi '',,~.s3!DJDJ]
&		) 	''		2  .;6r   c                <   U R                   (       dm  [        R                  R                  U R                  U R
                  5      U l         U R                  U R                  R                  U R                  5      5        [        R                  R                  U 5      $ )N)imr   corenewmoder&   	frombytesr   r    r'   load)r(   s    r   r9   GbrImageFile.load[   sY    wwjjnnTYY		:DGNN477<<89{{%%r   )r'   r#   r$   r4   N)returnNone)	__name__
__module____qualname____firstlineno__formatformat_descriptionr1   r9   __static_attributes__ r   r   r   r   (   s    F*-7^&r   r   z.gbrN)r   bytesr;   bool)
__future__r    r   r   _binaryr   r   r   r   register_openrA   register_extensionrD   r   r   <module>rL      sY   4 #  !R7&9&& 7&|   L''w ?   ,,f 5r   