Implementing rotate for save_png