Expression qimage:save(f,format) saves the image data into file f. Argument f can be a file name or a Lua file descriptor. The file format is determined by the optional string format or by the file name extension.