-ํ
็ถ<c       s    d  Z    d g Z 	 e d  Z # g  Z % d   Z * e i e  , d   Z 1 e i e  3 d   Z 9 e i e  ; d   Z	 A e i e	  C d   Z
 I e i e
  K d   Z P e i e  R d	   Z W e i e  Y d
   Z _ e i e  a d   Z f e i e  h d   Z l e i e  n d   Z r e i e  x d   Z  d   Z d S(   s<   Recognize image file formats based on their first few bytes.s   whatc    s  	 
 | t j o  t |   t d  j o(  t |  d  }  | i d  } n;  |  i   }  |  i d  }  |  i	 |   t } n
  t }  zB  x8 t
 D ]- }  | | |  }  | o  | Sn qฎ WWd    | o  | i   n X t Sd  S(   Ns    s   rbi    (   s   hs   Nones   types   files   opens   fs   reads   tells   locations   seeks   testss   tfs   ress   close(   s   files   hs   ress   locations   tfs   f(    (    s   /usr/lib/python2.2/imghdr.pys   what	 s&   	
 	

 c    s)   % & ' |  d  d j o ( d Sn d S(   s   SGI image libraryi   s   ฺs   rgbN(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_rgb% s   c    s/   , - . |  d  d d f j o / d Sn d S(   s   GIF ('87 and '89 variants)i   s   GIF87as   GIF89as   gifN(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_gif, s   c    s^   3 4 5 t  |   d j o0 |  d d j o |  d d j o |  d d j o 7 d Sn d	 S(
   s   PBM (portable bitmap)i   i    s   Pi   s   14i   s    	
s   pbmN(   s   lens   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_pbm3 s   Ic    s^   ; < = t  |   d j o0 |  d d j o |  d d j o |  d d j o ? d Sn d	 S(
   s   PGM (portable graymap)i   i    s   Pi   s   25i   s    	
s   pgmN(   s   lens   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_pgm; s   Ic    s^   C D E t  |   d j o0 |  d d j o |  d d j o |  d d j o G d Sn d	 S(
   s   PPM (portable pixmap)i   i    s   Pi   s   36i   s    	
s   ppmN(   s   lens   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_ppmC s   Ic    s/   K L M |  d  d d f j o N d Sn d S(   s-   TIFF (can be in Motorola or Intel byte order)i   s   MMs   IIs   tiffN(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys	   test_tiffK s   c    s)   R S T |  d  d j o U d Sn d S(   s   Sun raster filei   s   Yฆjs   rastN(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys	   test_rastR s   c    s8   Y Z [ d } \ |  t |   | j o ] d Sn d S(   s   X bitmap (X10 or X11)s   #define s   xbmN(   s   ss   hs   len(   s   hs   fs   s(    (    s   /usr/lib/python2.2/imghdr.pys   test_xbmY s   	c    s,   a b c |  d d !d j o d d Sn d S(   s   JPEG data in JFIF formati   i
   s   JFIFs   jpegN(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys	   test_jpega s   c    s&   h i |  d  d j o j d Sn d  S(   Ni   s   BMs   bmp(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_bmph s   c    s&   n o |  d  d j o p d Sn d  S(   Ni   s   PNG

s   png(   s   h(   s   hs   f(    (    s   /usr/lib/python2.2/imghdr.pys   test_pngn s   c     sๆ   x y d  k  }  z d } { |  i d o |  i d d j o | |  i d d 5} d } n ~ yI  |  i d o  t |  i d | d  n  t d g | d  Wn9  t j
 o*  |  i i d   |  i d  n Xd  S(   Ni    i   s   -ri   s   .s   
[Interrupted]
(   s   syss	   recursives   argvs   testalls   KeyboardInterrupts   stderrs   writes   exit(   s   syss	   recursive(    (    s   /usr/lib/python2.2/imghdr.pys   testx s   	%c    s    d  k  }  d  k }  x์ |  D ]แ }  | i i |  ot  | d G | p | oL  d GH d  k }  | i | i i	 | d   }  t | | d  n	  d GHnR  | d G | i i    y  t |  GHWn  t j
 o  d GHn Xq% Wd  S(   Ns   /:s   recursing down:s   *i    s   *** directory (use -r) ***s   :s   *** not found ***(   s   syss   oss   lists   filenames   paths   isdirs	   recursives   toplevels   globs   joins   namess   testalls   stdouts   flushs   whats   IOError(   s   lists	   recursives   toplevels   globs   filenames   syss   namess   os(    (    s   /usr/lib/python2.2/imghdr.pys   testall s$   
 	!N(   s   __doc__s   __all__s   Nones   whats   testss   test_rgbs   appends   test_gifs   test_pbms   test_pgms   test_ppms	   test_tiffs	   test_rasts   test_xbms	   test_jpegs   test_bmps   test_pngs   tests   testall(   s   whats	   test_tiffs   __all__s   test_ppms	   test_rasts   test_rgbs   tests   testalls   testss   test_pbms   test_pngs   test_pgms	   test_jpegs   test_bmps   test_xbms   test_gif(    (    s   /usr/lib/python2.2/imghdr.pys   ? s6   	