ó
ī Xc           @   sn   d  d l  m Z m Z m Z e j Z d   Z d e j f d     YZ e j d e e  e j	 d d  d S(   i’’’’(   t   Imaget	   ImageFilet   _binaryc         C   s)   t  |   d k o( t  |  d d ! d k S(   Ni   i   i   i   (   t   i32(   t   prefix(    (    s6   /usr/lib/python2.7/dist-packages/PIL/GbrImagePlugin.pyt   _accept   s    t   GbrImageFilec           B   s&   e  Z d  Z d Z d   Z d   Z RS(   t   GBRs   GIMP brush filec         C   s.  t  |  j j d   } t  |  j j d   } | d k  sH | d k rW t d   n  t  |  j j d   } t  |  j j d   } t  |  j j d   } | d k sĆ | d k sĆ | d k rŅ t d   n  |  j j | d  d  } d |  _ | | f |  _ | |  j d <|  j j | |  |  _ d  S(	   Ni   i   i   s   not a GIMP brushi    i’’’’t   Lt   comment(   R   t   fpt   readt   SyntaxErrort   modet   sizet   infot   data(   t   selft   header_sizet   versiont   widtht   heightt   bytesR	   (    (    s6   /usr/lib/python2.7/dist-packages/PIL/GbrImagePlugin.pyt   _open!   s    $	c         C   sK   |  j  s d  St j j |  j |  j  |  _ |  j j |  j   d |  _  d  S(   Nt    (   R   R    t   coret   newR   R   t   imt	   frombytes(   R   (    (    s6   /usr/lib/python2.7/dist-packages/PIL/GbrImagePlugin.pyt   load8   s
    	(   t   __name__t
   __module__t   formatt   format_descriptionR   R   (    (    (    s6   /usr/lib/python2.7/dist-packages/PIL/GbrImagePlugin.pyR      s   	R   s   .gbrN(
   t   PILR    R   R   t   i32beR   R   R   t   register_opent   register_extension(    (    (    s6   /usr/lib/python2.7/dist-packages/PIL/GbrImagePlugin.pyt   <module>   s
   		)