ó
U¶\c           @  sQ   d  Z  d d l m Z d d l Z d d l Z d   Z e d k rM e   n  d S(   sč   Helper script for creating image .dat files by numpy.save

Usage:

    python create_dat.py <name of image file> <name of dat file>

Example (to create aero.dat):

    python create_dat.py aero.png aero.dat

Requires Scipy and PIL.
i’’’’(   t   print_functionNc          C  sv   d d l  m }  t t j  d k r9 t t  t   n  t j d } t j d } |  |  } t j	 | d | d  S(   Ni’’’’(   t   imreadi   i   i   t   data(
   t
   scipy.miscR   t   lent   syst   argvt   printt   __doc__t   exitt   npt   savez_compressed(   R   t   image_fnamet	   dat_fnameR   (    (    s3   lib/python2.7/site-packages/pywt/data/create_dat.pyt   main   s    

t   __main__(   R   t
   __future__R    R   t   numpyR
   R   t   __name__(    (    (    s3   lib/python2.7/site-packages/pywt/data/create_dat.pyt   <module>   s   	