+
     iH  c                  s    R t ^ RIHt ^ RIHt ^RIHtHt ^RIH	t
 ^RIHt  ! R R]P                  4      tR R	 ltR
tR# )a  
This reader is based on the specification available from:
https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml
and has been tested with a few sample files found using google.

.. note::
    This format cannot be automatically recognized, so the reader
    is not registered for use with :py:func:`PIL.Image.open()`.
    To open a WAL file, use the :py:func:`PIL.WalImageFile.open()` function instead.
)annotations)IO)Image	ImageFile)i32le)StrOrBytesPathc                  s6    ] tR t^"tRtRtR R ltR R ltRtR# )	WalImageFileZWALzQuake2 Texturec                   V ^8  d   QhRR/# )   returnZNone format   "7/usr/lib64/python3.14/site-packages/PIL/WalImageFile.py__annotate__WalImageFile.__annotate__&   s     / /t /    c                	s   R V n         V P                  P                  ^d4      p\        V^ 4      \        V^$4      3V n        \
        P                  ! V P                  4       \        V^(4      pV P                  P                  V4       VR,          P                  R^4      ^ ,          V P                  R&   V^8^X P                  R^4      ^ ,          pV'       d   W0P                  R&   R# R# )ZP:Ni    Ns    Zname	next_nameN)_modefpreadi32_sizer   Z_decompression_bomb_checksizeZseekZsplitZinfo)selfZheaderZoffsetr   s   &   r   _openZWalImageFile._open&   s    
 /0_c&"o5
''		2 VRV #3K--eQ7:		&2(..ua8;	%.IIk" r   c               r   )r   r	   zImage.core.PixelAccess | Noner
   r   r   r   r   r   8   s     & &3 &r   c                	s   V P                   f   \        P                  P                  V P                  V P
                  4      V n        V P                  V P                  P                  V P
                  ^ ,          V P
                  ^,          ,          4      4       V P                  \        4       \        P                  P                  V 4      # )N)Z_imr   ZcoreZnewZmoder   imZ	frombytesr   r   Z
putpalettequake2paletteload)r      &r   r   ZWalImageFile.load8   sy    88jjnnTYY		:DGNN477<<		!tyy|(CDEOOM*{{%%r   )r   r   r   N)	Z__name__Z
__module__Z__qualname__Z__firstlineno__r   Zformat_descriptionr   r   Z__static_attributes__r
   r   r   r   r   "   s    F)/$& &r   r   c               s     V ^8  d   QhRRRR/# )r   filenamezStrOrBytesPath | IO[bytes]r	   r   r
   r   r   r   r   r   @   s     
" 
"- 
", 
"r   c                s    \        V 4      # )a  
Load texture from a Quake2 WAL texture file.

By default, a Quake2 standard palette is attached to the texture.
To override the palette, use the :py:func:`PIL.Image.Image.putpalette()` method.

:param filename: WAL file name, or an opened file handle.
:returns: An image instance.
)r   )r   r   r   openr    @   s     !!r   s   """&&&))),,,///222555777:::<<<$" 


##&""%" #!"  -( )$'"%8.1),%& <07,3(-$("
10.,*'
%!


)#'!& %#! 

&# 

3"5)&7/-95479:379046+14'.1"+/(,%* &%"
 
,!!*)'&$"!


.0)-.'+,&**$()#''!&&$$""
0-,*(&$!



()8&'6%&4$$1""/ !-*'%!
/2)-0&+.$),!'*%(#&!%"

?<9 5#1#-#)?????9??1??*?? ???<?9?5?2?-=*;&9!742/-*'#=???<.*6' 0!)<9772/1,(+&!0" N)Z__doc__Z
__future__r    Ztypingr   Z r   r   Z_binaryr   r   Z_typingr   r   r    r   r
   r   r   <module>r!      s=   	 #   ! #&9&& &<
"/H r   