3 }\ @sVddlmZddlmZy ddlZWn ek rDddlZeZYnXddZdZ dS))Image)i32leNc Cs:dd}t|dr||Stj|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. cSs|jd}t|dt|df}t|d}|j|tj|tjd||j|d|d}|jtd |_d |_ |ddj d dd|j d <|d dj d dd}|r||j d<|S)N  $(PrrZWALzQuake2 Texturename8 next_namer Xdr) readi32seekrZ_decompression_bomb_check frombytesZ putpalette quake2paletteformatformat_descriptionsplitinfo)fpheadersizeoffsetZimrrh/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-install-i584jbuk/Pillow/PIL/WalImageFile.pyimopen/s       zopen..imopenrrbN)hasattrbuiltinsopen)filenamer rrrrr$"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_binaryrrr# ImportError __builtin__r$rrrrrs    .