added image processing base code