Added prototype of image save function