³ò
Ô¿×Kc           @   s;   d  Z  d d k l Z e Z d „  Z d „  Z d „  Z d S(   sL   recipes mostly from http://www.pythonware.com/library/pil/handbook/image.htmiÿÿÿÿ(   t   Imagec         C   s5   t  i |  ƒ } | i d ƒ } | i | | i ƒ | S(   s2   convert to black-and-white rendition of same imaget   L(   R    t   opent   convertt   savet   format(   t
   sourcefilet   savefilet   imaget   bw(    (    s
   imaging.pyR	      s    c         C   s@   t  i |  ƒ } | i d j o t d ƒ t |  d ƒ } n d S(   sK   convert black-and-white image to double image that must be viewed crosseyedR   s   converting to bws   /tmp/bw.tmpN(   R    R   R   t   debugR	   (   R   R   R   (    (    s
   imaging.pyt	   crosseyed   s    
c         C   s   t  o t i |  IJn d  S(   N(   t	   DEBUGGINGt   syst   stderr(   t   message(    (    s
   imaging.pyR
      s    N(   t   __doc__t   PILR    t   TrueR   R	   R   R
   (    (    (    s
   imaging.pys   <module>   s
   		