B ¥.¦^_ã@s0ddlZddlmZddlmZdd„ZdZdS)éNé)ÚImage)Úi32lec Cs:dd„}t|dƒr||ƒSt |d¡ }||ƒSQRXdS)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 putpalette method. :param filename: WAL file name, or an opened file handle. :returns: An image instance. c Ssº| d¡}t|dƒt|dƒf}t|dƒ}| |¡t |¡t d|| |d|d¡¡}| t¡d|_d |_ |dd…  d d¡d|j d <|d d …  d d¡d}|r¶||j d<|S)Nédé é$é(ÚPrrZWALzQuake2 TextureóÚnameé8éXÚ next_name) ÚreadÚi32ÚseekrZ_decompression_bomb_checkZ frombytesZ putpaletteÚ quake2paletteÚformatÚformat_descriptionÚsplitÚinfo)ÚfpÚheaderÚsizeÚoffsetZimr©rú4/tmp/pip-install-mwhup7aw/Pillow/PIL/WalImageFile.pyÚimopen*s       zopen..imopenrÚrbN)ÚhasattrÚbuiltinsÚopen)Úfilenamerrrrrr!s  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" )r ÚrÚ_binaryrrr!rrrrrÚs  .