Create imagerec.py

Original script for review