Ńň
ľSJc        	   @   sŃ   d    Z  d   Z e d j oŽ d d k Z d d k Z e e i  d j  o! d e i d GHe i d  n x\ e i d D]I Z e i e  Z	 e	 d j o d	 e e	 d e	 d f GHq| d
 e GHq| Wn d S(   c         C   s=   d  } t |  d  } | o | i d  } | i   n | S(   Nt   rbi   (   t   Nonet   opent   readt   close(   t   filenamet   ht   f(    (    sU   /mnt/luc/web/www.saillard.org/www/programs_and_patches/photon/photon.hg/Photon/GIF.pyt   read_headers   s    c         C   sv   t  |   } | d  j o d  S| d  d j oC t | d  d >t | d  Bt | d  d >t | d  Bf Sd  S(   Ni   t   GIF87at   GIF89ai   i   i	   (   R	   R
   (   R   R   t   ord(   R   R   (    (    sU   /mnt/luc/web/www.saillard.org/www/programs_and_patches/photon/photon.hg/Photon/GIF.pyt   identify   s    Ct   __main__i˙˙˙˙Ni   s   Usage: %s files...
i    i   s   %s (size = %d,%d)s   %s is not a GIF file(   R   R   t   __name__t   syst   GIFt   lent   argvt   exitR   t   infoR   (    (    (    sU   /mnt/luc/web/www.saillard.org/www/programs_and_patches/photon/photon.hg/Photon/GIF.pyt   <module>   s   			 
