added saving image to png file