ó
N'^c           @   s   d  d l  m Z m Z d  d l m Z d Z d Z e j Z d   Z	 d e f d     YZ
 e j e
 j e
 e	  e j e
 j d  d	 S(
   iĸĸĸĸ(   t   Imaget   _binary(   t   PcxImageFiles   0.2iąhÞ:c         C   s"   t  |   d k o! t |   t k S(   Ni   (   t   lent   i32t   MAGIC(   t   prefix(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   _accept"   s    t   DcxImageFilec           B   sM   e  Z d  Z d Z d   Z e d    Z e d    Z d   Z d   Z	 RS(   t   DCXs	   Intel DCXc         C   sĒ   |  j  j d  } t |  t k r3 t d   n  g  |  _ xF t d  D]8 } t |  j  j d   } | sq Pn  |  j j |  qI W|  j  |  _ |  j	 d  d  S(   Ni   s   not a DCX filei   i    (
   t   fpt   readR   R   t   SyntaxErrort   _offsett   ranget   appendt   _DcxImageFile__fpt   seek(   t   selft   st   it   offset(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   _open.   s    	c         C   s   t  |  j  S(   N(   R   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   n_frames@   s    c         C   s   t  |  j  d k S(   Ni   (   R   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   is_animatedD   s    c         C   sa   | t  |  j  k r$ t d   n  | |  _ |  j |  _ |  j j |  j |  t j |   d  S(   Ns%   attempt to seek outside DCX directory(	   R   R   t   EOFErrort   frameR   R
   R   R   R   (   R   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyR   H   s    	c         C   s   |  j  S(   N(   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   tellP   s    (
   t   __name__t
   __module__t   formatt   format_descriptionR   t   propertyR   R   R   R   (    (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyR   )   s   		s   .dcxN(   t   PILR    R   t   PIL.PcxImagePluginR   t   __version__R   t   i32leR   R   R   t   register_openR   t   register_extension(    (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/DcxImagePlugin.pyt   <module>   s   		+