ó
O'—^c           @   s„   d  d l  m Z m Z d Z d „  Z d „  Z d e j f d „  ƒ  YZ e j e j	 e ƒ e j
 e j	 d ƒ e j e j	 d ƒ d	 S(
   iÿÿÿÿ(   t   Imaget   JpegImagePlugins   0.1c         C   s   t  j |  ƒ S(   N(   R   t   _accept(   t   prefix(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyR      s    c         C   s   t  j |  | | ƒ S(   N(   R   t   _save(   t   imt   fpt   filename(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyR      s    t   MpoImageFilec           B   sV   e  Z d  Z d Z d „  Z d „  Z e d „  ƒ Z e d „  ƒ Z d „  Z	 d „  Z
 RS(   t   MPOs   MPO (CIPA DC-007)c         C   sè   |  j  j d ƒ t j j |  ƒ |  j ƒ  |  _ |  j d |  _ g  |  j d D] } | d |  j d ^ qM |  _	 d |  j	 d <|  j t
 |  j	 ƒ k sœ t ‚ |  j d =|  j  |  _ |  j j |  j	 d ƒ d |  _ d |  _ d |  _ d  S(   Ni    i°  i°  t
   DataOffsett   mpoffseti   (   R   t   seekR   t   JpegImageFilet   _opent   _getmpt   mpinfot   _MpoImageFile__framecountt   infot   _MpoImageFile__mpoffsetst   lent   AssertionErrort   _MpoImageFile__fpt   _MpoImageFile__framet   offsett   readonly(   t   selft   mpent(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyR   +   s    /
		c         C   s   |  j  j | ƒ d  S(   N(   R   R   (   R   t   pos(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyt	   load_seek>   s    c         C   s   |  j  S(   N(   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyt   n_framesA   s    c         C   s   |  j  d k S(   Ni   (   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyt   is_animatedE   s    c         C   s~   | d k  s | |  j  k r* t d ƒ ‚ nG |  j |  _ |  j | |  _ d d |  j |  j |  j d f f g |  _ | |  _	 d  S(   Ni    s   no more images in MPO filet   jpegt    (   i    i    (
   R   t   EOFErrorR   R   R   R   t   sizet   modet   tileR   (   R   t   frame(    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyR   I   s    +c         C   s   |  j  S(   N(   R   (   R   (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyt   tellT   s    (   t   __name__t
   __module__t   formatt   format_descriptionR   R   t   propertyR   R   R   R'   (    (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyR   &   s   			s   .mpos	   image/mpoN(   t   PILR    R   t   __version__R   R   R   R   t   register_saveR*   t   register_extensiont   register_mime(    (    (    s4   /tmp/pip-unpacked-wheel-ivxKtu/PIL/MpoImagePlugin.pyt   <module>   s   		9