î
&"ìV  ã               @   s|   d  d l  m Z d  d l m Z m Z y d  d l Z Wn$ e k
 r\ d  d l Z e Z Yn Xe j Z	 d d „  Z
 d Z d S)é    )Úprint_function)ÚImageÚ_binaryNc             C   s  t  |  d ƒ r |  } n t j |  d ƒ } | j d ƒ } t | d ƒ t | d ƒ f } t | d ƒ } | j | ƒ t j d | | j | d	 | d
 ƒ ƒ } | j t	 ƒ d | _
 d | _ | d  d … j d d
 ƒ d	 | j d <| d d … j d d
 ƒ d	 } | r| | j d <n  | S)NÚreadÚrbé    é   é   é$   é(   ÚPr   é   ZWALzQuake2 Textures    Únameé8   Ú	next_namer   éX   éd   r   )ÚhasattrÚbuiltinsÚopenr   Úi32Úseekr   Z	frombytesZ
putpaletteÚquake2paletteÚformatÚformat_descriptionÚsplitÚinfo)ÚfilenameÚfpÚheaderÚsizeÚoffsetZimr   © r"   ú2/tmp/pip-build-fj3bmf4v/Pillow/PIL/WalImageFile.pyr   .   s     	*		' r   s   """&&&))),,,///222555777:::<<<$" 


##&""%" #!"  -( )$'"%8.1),%& <07,3(-$("
10.,*'
%!


)#'!& %#! 

&# 

3"5)&7/-95479:379046+14'.1"+/(,%* &%"
 
,!!*)'&$"!


.0)-.'+,&**$()#''!&&$$""
0-,*(&$!



()8&'6%&4$$1""/ !-*'%!
/2)-0&+.$),!'*%(#&!%"

?<9 5#1#-#)?????9??1??*?? ???<?9?5?2?-=*;&9!742/-*'#=???<.*6' 0!)<9772/1,(+&!0" )Ú
__future__r   ZPILr   r   r   ÚImportErrorÚ__builtin__Zi32ler   r   r   r"   r"   r"   r#   Ú<module>   s   	"