switching figures to png