ó
î Xc           @   s{   d  Z  d d l m Z m Z d „  Z d „  Z d e j f d „  ƒ  YZ e j d e ƒ e j	 d d ƒ e j
 d d	 ƒ d
 S(   s   0.1iÿÿÿÿ(   t   Imaget   JpegImagePluginc         C   s   t  j |  ƒ S(   N(   R   t   _accept(   t   prefix(    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyR      s    c         C   s   t  j |  | | ƒ S(   N(   R   t   _save(   t   imt   fpt   filename(    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyR      s    t   MpoImageFilec           B   s8   e  Z d  Z d Z d „  Z 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(    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyR   +   s    /
		c         C   s   |  j  j | ƒ d  S(   N(   R   R   (   R   t   pos(    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyt	   load_seek>   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(    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyR   A   s    +c         C   s   |  j  S(   N(   R   (   R   (    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyt   tellL   s    (   t   __name__t
   __module__t   formatt   format_descriptionR   R   R   R%   (    (    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyR   &   s   			R	   s   .mpos	   image/mpoN(   t   __version__t   PILR    R   R   R   R   R   t   register_savet   register_extensiont   register_mime(    (    (    s6   /usr/lib/python2.7/dist-packages/PIL/MpoImagePlugin.pyt   <module>   s   		0