K i7~dZddlmZddlmZddlmZmZddlm Z ddl m Z Gdd ejZ 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) WalImageFileWALzQuake2 Texturecd|_|jjd}t|dt|df|_t j |jt|d}|jj||ddjddd|jd <|d d jdddx}r||jd <yy) NPd $(rrname8X next_name) _modefpreadi32_sizer_decompression_bomb_checksizeseeksplitinfo)selfheaderoffsetrs V/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/PIL/WalImageFile.py_openzWalImageFile._open&s /0_c&"o5  '' 2VR  V#3BK--eQ7: &rG,225!rCs= #!#&9&&&: "/Hr'