Ζ
ήMφ9c       st    d  Z    e d  Z " g  Z $ d   Z ) e i e  + d   Z 0 e i e  2 d   Z 8 e i e  : d   Z @ e i e  B d   Z	 H e i e	  J d   Z
 O e i e
  Q d   Z V e i e  X d	   Z ^ e i e  ` d
   Z e e i e  g d   Z k e i e  m d   Z q e i e  w d   Z  d   Z d S(   s<   Recognize image file formats based on their first few bytes.c    s   	 | t j o 
 t |   t d  j o(  t |  d  }  | i d  } n;  |  i   }  |  i d  }  |  i	 |   t } n
  t }  zD  x: t
 d  r- }  | | |  }  | o  | Sn q° WWd    | o  | i   n X t Sd  S(   Ns    s   rbi    i    (   s   hs   Nones   types   files   opens   fs   reads   tells   locations   seeks   testss   tfs   ress   close(   s   files   hs   fs   locations   tfs   ress#   /mit/python/lib/python2.0/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   fs#   /mit/python/lib/python2.0/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   fs#   /mit/python/lib/python2.0/imghdr.pys   test_gif+ s   c    s^   2 3 4 t  |   d j o0 |  d d j o |  d d j o |  d d j o 6 d Sn d	 S(
   s   PBM (portable bitmap)i   i    s   Pi   s   14i   s    	
s   pbmN(   s   lens   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys   test_pbm2 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   fs#   /mit/python/lib/python2.0/imghdr.pys   test_pgm: s   Ic    s^   B C D t  |   d j o0 |  d d j o |  d d j o |  d d j o F d Sn d	 S(
   s   PPM (portable pixmap)i   i    s   Pi   s   36i   s    	
s   ppmN(   s   lens   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys   test_ppmB s   Ic    s/   J K L |  d  d d f j o M d Sn d S(   s-   TIFF (can be in Motorola or Intel byte order)i   s   MMs   IIs   tiffN(   s   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys	   test_tiffJ s   c    s)   Q R S |  d  d j o T d Sn d S(   s   Sun raster filei   s   Y¦js   rastN(   s   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys	   test_rastQ s   c    s8   X 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   ss#   /mit/python/lib/python2.0/imghdr.pys   test_xbmX s   	c    s,   ` a b |  d d !d j o c d Sn d S(   s   JPEG data in JFIF formati   i
   s   JFIFs   jpegN(   s   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys	   test_jpeg` s   c    s&   g h |  d  d j o i d Sn d  S(   Ni   s   BMs   bmp(   s   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys   test_bmpg s   c    s&   m n |  d  d j o o d Sn d  S(   Ni   s   PNG

s   png(   s   h(   s   hs   fs#   /mit/python/lib/python2.0/imghdr.pys   test_pngm s   c     sζ   w x d  k  }  y d } z |  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	   recursives#   /mit/python/lib/python2.0/imghdr.pys   testw s   	%c    s    d  k  }  d  k }  xξ |  d  rα }  | 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(   Ni    s   /:s   recursing down:s   *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   syss   oss   filenames   globs   namess#   /mit/python/lib/python2.0/imghdr.pys   testall s$    	!N(   s   __doc__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#   /mit/python/lib/python2.0/imghdr.pys   ? s4   	