-ν
ηΆ<c       s)  d  Z  d g Z e d  Z g  Z d   Z e i e  d   Z e i e  d   Z e i e  d   Z	 e i e	  d   Z
 e i e
  d   Z e i e  d	   Z e i e  d
   Z e i e  d   Z e i e  d   Z e i e  d   Z e i e  d   Z d   Z d S(   s<   Recognize image file formats based on their first few bytes.s   whatc    sΤ   | t j om t |   t d  j o" t |  d  } | i d  } n/ |  i   } |  i d  } |  i	 |  t } n t } z3 x, t
 D]$ } | | |  } | o | Sn q WWd  | o | i   n Xt 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    sR   t  |   d j o0 |  d d j o |  d d j o |  d d j o 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     Fc    sR   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     Fc    sR   t  |   d j o0 |  d d j o |  d d j o |  d d j o 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     Fc    s#   |  d  d d f j o 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   |  d  d j o 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    s)   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    |  d d !d j o 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   |  d  d j o 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   |  d  d j o 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Ώ   d  k  }  d } |  i d o |  i d d j o |  i d d 5d } n y@ |  i d o t |  i d | d  n t d g | d  Wn0 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 |  o_ | d G| p | o@ d GHd  k } | i | i i	 | d   } t | | d  n d GHn@ | 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   													