ó
î Xc           @  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 n Xe j Z	 d   Z
 d Z e d k rµ e
 d  Z e e j e j e j  e j d  n  d S(	   i˙˙˙˙(   t   print_function(   t   Imaget   _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  j d d
  d	 | j d <| d d !j d d
  d	 } | r| | j d <n  | S(   Nt   readt   rbi    i   i   i$   i(   t   Pi    i   t   WALs   Quake2 Texturet    t   namei8   t	   next_namei8   iX   id   iX   (   t   hasattrt   builtinst   openR   t   i32t   seekR   t	   frombytest
   putpalettet   quake2palettet   formatt   format_descriptiont   splitt   info(   t   filenamet   fpt   headert   sizet   offsett   imR	   (    (    s4   /usr/lib/python2.7/dist-packages/PIL/WalImageFile.pyR   .   s     	*		!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" t   __main__s   ../hacks/sample.wals
   ../out.png(   t
   __future__R    t   PILR   R   R   t   ImportErrort   __builtin__t   i32leR   R   R   t   __name__R   t   printR   t   modeR   t   save(    (    (    s4   /usr/lib/python2.7/dist-packages/PIL/WalImageFile.pyt   <module>   s   
		"2