[engine]Implemented the save function in the imagemanager.