Files
intellecton/venv/lib/python3.12/site-packages/PIL/__pycache__/WalImageFile.cpython-312.pyc
T

54 lines
4.1 KiB
Plaintext
Raw Normal View History

Ë
ß¼j‚ãó~dZddlmZddlmZddlmZmZddlm Z
ddl m Z Gdd ej«Z
d
d
Zd Zy )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ó$eZdZdZdZddZddZy)Ú WalImageFileÚWALzQuake2 TexturecóÈd|_|jJ|jjd«}t|d«t|d«f|_t j |j«t|d«}|jj|«|ddjdd«d|jd <|d
d jdd«dx}r||jd <yy)
Pédé é$é(órrÚnameé8éXÚ next_name) Ú_modeÚfpÚreadÚi32Ú_sizerÚ_decompression_bomb_checkÚsizeÚseekÚsplitÚinfo)ÚselfÚheaderÚoffsetrs úS/home/antigravity/intellecton/venv/lib/python3.12/site-packages/PIL/WalImageFile.pyÚ_openzWalImageFile._open'؈Œ
ðw‰wÐÐܘ “_¤c¨&°"£oÐ5ˆŒ
Ü
ׯ © ÔV˜R“ˆØ  ð# 3 B˜K×-¨e°QÓ7¸Ñ:ˆØ˜r ,×2°5¸<¸ ?ˆ ?Ø%.ˆDI‰I  @ócóž|j€£|jJtjj |j
|j «|_|j|jj|j d|j dz««|jt«tjj|«S)Nrr)
Ú_imrrÚcoreÚnewÚmoderÚimÚ frombytesrÚ
putpaletteÚ
quake2paletteÚload)r"s r%r1zWalImageFile.load9s‰Ø 8‰8Ð Ø—7 —jj—nn T§Y¡Y°· ± Ó:ˆDŒGØ N‰N˜4Ÿ7™7Ÿ<™<¨¯ © °!© °t·y±yÀ±|Ñ(CÓ O‰OœMÔ {‰{×Ñ Ó%r'N)ÚreturnÚNone)r2zImage.core.PixelAccess | None)Ú__name__Ú
__module__Ú __qualname__ÚformatÚformat_descriptionr&r1©r'r%r r #sØ
€FØó/ô$&r'r cót|«S)a2
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 )Úfilenames r%Úopenr<Bsô ˜Ó !r's """&&&))),,,///222555777:::<<<$" 


  


##&""%" #!"  
-( )$'"%8.1),%& <07,3(-$(" 
10.,
* '
%!
   



)#'!& %#!