represent image as grap