refactor draw_image to animation, fix some bugs