)Ej|dZddlmZddlmZddlmZmZddlm Z ddl m Z Gdd ejZ dd ZdZdS)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&eZdZdZdZd dZd dZdS) WalImageFileWALzQuake2 TexturereturnNonecd|_|jJ|jd}t|dt|df|_t j|jt|d}|j||dd ddd|j d <|d d  dddx}r ||j d <dSdS) NPd $(rrname8X next_name) _modefpreadi32_sizer_decompression_bomb_checksizeseeksplitinfo)selfheaderoffsetrs BC:\PYTHON\MyICR_Suite\python\Lib\site-packages\PIL/WalImageFile.py_openzWalImageFile._open's w"""/00__c&"oo5  ' 222VR  V#3B3K--eQ77: &rG|,225!<Bs  ! !!r)s """&&&))),,,///222555777:::<<<$"         ##&""%" #!"   -( )$'"%8.1),%& <07,3(-$("  10., * ' %!        )#'!& %#!    &#    3"5)&7/-95479:379046+14'.1"+/(,%* & % "    ,!!*)'&$"!  .0)-.'+,&**$()#''!&&$$"" 0-,*(&$!       ()8&'6%&4$$1""/ !-*'%!  /2)-0&+.$),!'*%(#&!%"    ?< 9 5#1#-#)?????9??1??*?? ???<?9?5 ?2?-=*;&9!742/-* '#=??? <.*6' 0!)<9772/1,(+&!0" N)r;r<r r )__doc__ __future__rtypingrrr_binaryrr_typingr r r>r3r:r)r'rEs  #"""""!!!!!!######&&&&&9&&&&> " " " "/H r)