add test code of using array as image