Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2v�j���SrSSKJr SSKJr SSKJrJr SSKJ	r3 SSKJr "SS	\R5r
S
S4jrSrg)a�5This reader is based on the specification available from:6https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml7and has been tested with a few sample files found using google.8 9.. note::10    This format cannot be automatically recognized, so the reader11    is not registered for use with :py:func:`PIL.Image.open()`.12    To open a WAL file, use the :py:func:`PIL.WalImageFile.open()` function instead.13�)�annotations)�IO�)�Image�	ImageFile)�i32le)�StrOrBytesPathc�0�\rSrSrSrSrSSjrS	SjrSrg)14�WalImageFile�#�WALzQuake2 Texturec���SUlURceURRS5n[US5[US54Ul[15R"UR5 [US5nURRU5 USSRSS5SURS	'US16SRSS5S=n(aX0RS'gg)
N�P�d� �$�(�rr�name�8�X�	next_name)�_mode�fp�read�i32�_sizer�_decompression_bomb_check�size�seek�split�info)�self�header�offsetrs    �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/WalImageFile.py�_open�WalImageFile._open's�����17��w�w�"�"�"������/�0�����_�c�&�"�o�5��18�
�'�'��	�	�2��V�R��������V��#�3�B�K�-�-�e�Q�7��:��	�	�&���r�G�,�2�2�5�!�<�Q�?�?�9�?�%.�I�I�k�"�@�c��URc�URce[RR	UR19UR5UlURURRURSURS-55 UR[5 [RRU5$)Nrr)
�_imrr�core�new�moder�im�	frombytesr�20putpalette�
quake2palette�load)r#s r&r3�WalImageFile.load9s����8�8���7�7�&�&�&��j�j�n�n�T�Y�Y��	�	�:�D�G��N�N�4�7�7�<�<��	�	�!��t�y�y��|�(C�D�E��O�O�M�*��{�{����%�%r))rrr/N)�return�None)r5zImage.core.PixelAccess | None)	�__name__�21__module__�__qualname__�__firstlineno__�format�format_descriptionr'r3�__static_attributes__�r)r&rr#s��
�F�)��/�$&r)rc��[U5$)a22Load texture from a Quake2 WAL texture file.23 24By default, a Quake2 standard palette is attached to the texture.25To override the palette, use the :py:func:`PIL.Image.Image.putpalette()` method.26 27:param filename: WAL file name, or an opened file handle.28:returns: An image instance.29)r)�filenames r&�openrABs����!�!r)s"""&&&))),,,///222555777:::<<<$" 



3031
32##&""%" #!"  


-( )$'"%8.1),%& <07,3(-$("3310.,
*'34%!
353637
)#'!& %#! 
3839&# 

40413"5)&7/-95479:379046+14'.1"+/(,%* &
%"42 
43,!!*)'&$"!


44 45 46.0)-.'+,&**$()#''!&&$$""
470-,*(&$!
48
495051()8&'6%&4$$1""/ !-*'%!
52/2)-0&+.$),!'*%(#&!%"
53
54?<9 5#1#-#)?????9??1??*?? ???<?9?5?2?-=*;&9!742/-*'#=???

<.*6' 0!)<9772/1,(+&!0" N)r@zStrOrBytesPath | IO[bytes]r5r)�__doc__�55__future__r�typingr�rr�_binaryrr�_typingr	rrAr2r>r)r&�<module>rHs=��	�#���!�#�&�9�&�&�&�>56"�/H�r)