Implemented saving image data into different file formats